Jason Haley

Ramblings from an Independent Consultant

Learning containers, Docker and Kubernetes

This blog has been quiet for a while, mainly because I have been busy learning containers, Docker and Kubernetes. In the past year and a half, the learning has often been side projects and presentations – but this year things have changed and I’m now using this stuff on a daily basis. I still have a lot to learn but I think it is time to start sharing some of what I have learned.

My motivations for understanding and using containers has evolved from focusing on a new deployment solution (ie. Docker containers) to running applications in an environment that assumes everything is already containerized (ie. Kubernetes). In between those two are new DevOps techniques to connect the them and in the end my life as a developer easier.

However, I’m still on the journey and have a lot more to learn.

Containers and Docker are the basics

Step one in this journey really is learning what containers are. Step two is taking the container concept and using Docker to apply it.

First start out with pulling and running existing Docker images from DockerHub. Donavan Brown has a nice blog on Fun with SQL Server Containers that requires little knowledge of how it all works and shows you the practical nature of how to use containers. It will get those gears in your head turning.

After you have played with Docker for a while, the next challenge is to go from source code to a running container. For this, you’ll need an introduction to Dockerfile.

If you use Visual Studio, the easiest way to get started is to create a new .NET Core ASP.NET project and check the “Enable Docker Support” checkbox. Then run your application.

After that is really learning what the Dockerfile does and some Best practices for writing Dockerfiles so you can start customizing it when needed.

Running in Kubernetes is the goal

With Kubernetes, there are options for to get started:

1. Use Kubernetes with Docker Desktop – this is the quickest, free and runs on your local machine.

2. Use Azure Kubernetes Service - this compares to Kubernetes the Easy Way and will put your application in the cloud.

3. Kubernetes The Hard Way - this will give you the ultimate understanding of how the platform works, since you’ll need to build it all.

If your goal is like mine, running your application in Kubernetes, then I would recommend #1 and then move to #2. Eventually I’d recommend trying out #3 to get a deeper dive once you are familiar with using Kubernetes.

Recently I discovered the Kubernetes Learning Path that walks you through videos, articles and hands on practice – I highly recommend starting with it.

What’s next

Watch this blog. I’m going to start regularly posting on containers, Docker and Kubernetes. I’m working on a sort of blog series about general tips and tricks I’ve learned along the way and new things as I discover them.

If you are an application developer and learning containers, Docker or Kubernetes and have a topic you’d like to see please contact me on Twitter @haleyjason.