Why should a Software Developer know about it?

Alright let me give you the tl:dr right now! Kubernetes is a Container Orchestrator that makes sure that Containers are where they’re supposed to be. Now that is very short and maybe you kind of get it, but let’s go into it and dissect what we are doing when we use Kuberenetes.

What does it solve?

In the normal deployment model when you update a component of the application you had to roll it out with the rest of the application potentially dedicating resources to all of the components instead of just the one you wanted to focus on. Microservices allow for you to update the component without having to focus on the rest of them. Kubernetes takes this a step further by helping to manage Containers as clusters that can communicate with one another through the Kubernetes API. Now I threw a lot at you so lets break this down to help define the attributes that help build Kubernetes to what it is.

Containers

Now if you’re unfamiliar with Containers you’re probably asking yourself “What does a Container mean here”?

Well a Container is a ready to run software package, containing everything needed to run an application(code, the Runtime it requires, application and system libraries, and default values for settings). Container Images also are immutable, meaning you can’t change the code of a container that is already running. You will have to create a new image that includes the changes you wanted to make.

Container Runtime is the software that runs containers. There are many out there but the well known ones are Docker, containerd, and CRI-O. These allow for you to not actually use a Virtual Machine, which would need the OS that will take up a lot of memory, but only focus on the actually libraries needed for running the application that is in the Container.

Pods

Pods are a collection of multiple Containers. In order to create a Pod you’ll create a YAML file where you’ll write metadata and specs. Metadata groups pods and resources together while specs you name pods and create a port section on where it can be accessed in the web.

Nodes

Nodes is a Virtual or Physical Machine that you run the workloads on. Each Node has all the services to run pods. This includes pods, kubelet(makes sure that everything that is running is), kube-proxy(handles the networking), and the runtime.

Control Plane

The control plane is made up of different components and here are a few descriptions of each one.

Kubernetes API

The API is the core of the control plane. Handles the data validation, let’s end users, different parts of the cluster, and external components to communicate with one another. It lets you query and manipulate the state of object in Kubernetes. The core of the control lies within the API server and the HTTP API that is exposes.

Etcd

Is the key value store used as Kubernetes’ backing store for all cluster data. It is designed to give users a more efficient and cleaner abstraction.

Scheduler

Watches for newly created Pods that don’t yet have a node. It becomes responsible for finding the best node for the Pod to run on. You can customize it if necessary.

Kubernetes Objects

Are persistent entities in the system. They can describe containerized application are running and which nodes, the resources available to those applications, and the policies around how those applications behave.

Controller Manager

The core Kubernetes logic happens here and it handles the life cycle management so that when Kubernetes is looking for the desired state it can achieve it by adjusting accordingly.

Cloud Controller

This lets our connection to the Cloud if you’re using it.

That’s a lot

Yeah it really is and I did my best to break down the pieces. Overall think of Kubernetes as a tool to use when you have a huge Applications with multiple working pieces. You’ll only be implementing it in certain situations where your application will continue to grow to the point that microservices alone are not going to cut it. So if you’re considering a job in it, you’ll be looking at DevOps which is an important part of any large scale applications toolset. I hope this broke up the idea and if you want to continue to explore it check out some of the links below.

If you need a visual, below I have what the architecture looks like.

Resources:

https://www.youtube.com/watch?v=4ht22ReBjno&ab_channel=Deis%2CInc.