What and Why of Kubernetes

Learning references for k8s

As I have been exploring Kubernetes (k8s), I have run into a number of resources that I wish I had read in a different order. Below are my recommendations for getting started with Kubernetes.

I started looking into Kubernetes more seriously in December of 2017. At that time my company was just getting past deploying containers into production with Docker and was eagerly looking toward container orchestration. Since my group had some production systems that needed rebuilding that weren’t mission critical (yet), I offered my group to be the guinea pig and started reading everything I could find.

I won’t recommend my approach to learning because is was terribly inefficient in how I spent my time. Instead, I will present them in the order that I wish I had been introduced to them. :)

Good Visual Overviews

When learning Kubernetes, I have found that good visual overviews are incredibly helpful. Kubernetes has so many moving pieces that it is difficult to keep track of them all - especially if you try to get them all into your head at once.

Don’t take the title of the first as dismissive, much like the awesome “Git For Ages 4 And Up”, it addresses the complex topic of container orchestration in an approachable way. I highly recommend it as a way of getting a visual model of some of the basic Kubernetes layers including containers, pods, labels, replication controllers, services, and volumes.

The Google comic takes a different tact - it comes at the “what” and “why” of Kubernetes from a sysadmin point-of-view. It also has a bit of silliness mixed in - and a small pitch for Google Kubernetes Engine (GKE) - but does a good job of making its case a piece at a time.

More on Why and What

Very recently (the day I wrote this post), Scott Hanselman posted an excellent writeup of his own take on why you should care about Kubernetes.

In Scott’s post, he calls out an earlier, great post by Julia Evans on her reasons Kubernetes is cool. Julia’s post is one of the first I read on Kubernetes that connected with me and led me to the series I mention below by Kamal Marhubi.

Hands On

Once you have a sense of what Kubernetes is and why it might be useful to you, nothing beats some hands-on time. Download Minikube and give the Kubernetes Basics a spin. When you are done, you will have decent idea of what it takes to create a cluster, deploy and app, interact with an app, make it publicly available, scale the app, and even update it.

When going through these, I still felt like there was a lot of magic involved and wanted to break each piece down a bit. I found that @kamalmarhubi had written a three post series doing just that in 2015.

I was inspired enough by Kamal’s work that I started the process of writing an updated component-by-component walkthrough of Kubernetes with some of my own learnings added. :)

(2019 Update) Since this was originally posted, I have found the KataCoda scenarios to be very helpful for working through increasingly more complex real-world-ish situations. For bonus points, you can dig into the details of the YAML they use in the earlier exercises you will also have a chance to learn more from the Kubernetes equivalent of “viewing source”!

If you are really ready to go and dig into the details, then the much recommended Kubernetes The Hard Way will walk you through setting up a cluster in the Google Cloud Platform complete with CA certificates.