Kubernetes for Dummies

Kubernetes for Dummies
Photo by Maximilian Weisbecker / Unsplash

The software world has changed since the increase in the popularity of containerisation.

Technologies such as Docker are widely used to manage and spin up containers quickly. It has been used in big companies such as Google but they had one big issue.

There were just too many containers. Companies such as Google start over 2 billion containers per week.

It's very tedious to manage this all. That's why a group of smart engineers at Google created a tool called Kubernetes to orchestrate containers.

Kubernetes at first glance looks pretty intimidating but it's not.

There are a few key concepts that you have to learn and everything else builds on top of them.

Today I will share with you these key concepts and hopefully jump-start you on your Kubernetes journey.

Today you will learn what Kubernetes is and its basic architecture.

What is Kubernetes?

If we google Kubernetes, we will get something like this.

Kubernetes is an open-source container orchestration system for automating software deployment, scaling, and management – Wikipedia

So in a nutshell, Kubernetes is a tool used to manage containers.

If you are unfamiliar with containers, feel free to check out my article on Docker and Containerization.

A Simple Introduction to Docker
Imagine this One day you got to work All your buddies talk about this weird magical tech called...

But before we begin playing around with Kubernetes, let's check out the underlying architecture.

Kubernetes Architecture

Source: https://avinetworks.com/glossary/kubernetes-architecture/

A Kubernetes cluster consists of at least two nodes (virtual or physical machines).

The two nodes are:

  • Master Node.
  • Worker Node.

Master Node

The master node is used to manage Kubernetes itself. It contains vital processes that run and operate our cluster correctly.

The vital processes are:

The API server exposes an HTTP API that lets end-users, different parts of your cluster, and external components communicate with one another.

  • API Server – This is the main entry point to our Kubernetes cluster. It manages the APIs that are exposed by the server, validates any client requests and finally manages any background operations.
  • Controller Manager – This process checks the state of your cluster and makes or requests changes when needed. Each controller tries to move the current cluster state closer to the desired state
  • Scheduler – This makes sure that pods are matched to nodes so that Kubelet can run them.
  • etcd – Is a consistent and highly available key-value storage that holds the state of the Kubernetes cluster.

The master node is absolutely vital to Kubernetes, that's why in production environments you would have at least two instances of master nodes. This is just in case if one master node fails, there is another as a backup.

Worker Node

This is usually just called a node.

A node has three main components.

  • Kubelet – An agent that runs on each node in the cluster. It makes sure that containers are running in a pod.
  • Container Runtime – The container runtime is the software that is responsible for running containers.
  • Kube-Proxy – This is a network proxy that runs on each node in the cluster.

Another fact is that the worker nodes usually have more processing power than master nodes because they will be running most of the workload. But that does not mean that the master node is any less important, it is in fact more important than the worker nodes.

Virtual Network

Another important component of Kubernetes is the virtual network that enables the nodes to communicate with each other.

In a nutshell, the virtual network turns all the nodes in a cluster into one unified machine.

How to get started?

To get started with Kubernetes just head over to the hello world tutorial provided by the Kubernetes team.

Hello Minikube
This tutorial shows you how to run a sample app on Kubernetes using minikube and Katacoda. Katacoda provides a free, in-browser Kubernetes environment. Note: You can also follow this tutorial if you’ve installed minikube locally. See minikube start for installation instructions. Objectives Deploy a…

If you want something more in-depth, feel free to check out this Udemy course.



I hope you learned something today, if you did then feel free to share this article with your friends and colleagues.

Thanks for reading.


Member discussion