In a recent post, I wrote a review of 2020 in cloud computing and one of the top trends was Kubernetes. Kubernetes began life as an internal tool for automation for Google in 2014 and is now maintained by the Cloud Native Computing Foundation. I have taken more notice of Kubernetes over the last two years from the announcements by VMware and implementation with VMware vSphere 7. Kubernetes offerings are available in the public cloud as well now, as PaaS or IaaS offerings from AWS, Azure, and Google cloud. In this article, I will explain the concepts and components of Kubernetes and also provide useful training resources.
The definition of Kubernetes from Wikipedia is: “platform for automating deployment, scaling, and operations of application containers across clusters of hosts.”
Traditionally enterprise systems were ran on physical hardware with consistent operating systems and the more the application growth translated to more physical hardware and increased cost. Then over the last 10-15 years the rise of virtualization was a game changer as it removed the reliance on the hardware level. Now the next game changer in the industry is containerization, as containers are lightweight and ideal for agile applications and continuous development.
Kubernetes Components
Kubernetes cluster consists of a control plane and worker machines which are called nodes. These nodes host pods, which are the application workload.
Control plane components
The control plane is responsible for the management of the nodes and pods in the cluster. The four main components of the control plane below:
kube-apiserver
The main component of the control plane is the API server, which exposes the Kubernetes application programming interface (or API). The API server is scalable, as with each new instance another kube-apiserver is added to the cluster.
etcd
etcd is a crucial component of Kubernetes. This control component is a key-value database store for all Kubernetes cluster data. It also stores the actual state of the system and desired state of the system in etcd. The stored data in etcd is used to watch functionality to monitor changes to either actual or desired state. If there is any change in these two states, Kubernetes manages change to reconcile the actual sate and the desired state.
kube-scheduler
The kube-scheduler component watches for newly created pods with no node assigned and selects a node for them.
kube-controller-manager
The kube-controller-manager component is reposnisble for managing the controller processes. Each controller is a separate process. Some of controllers in Kubernetes are – Node controller, Replicuation controller, Endpoints controller, and Service account /Token controllers
Node components
Each node has the below three components that run on every node. The node componenets are responsible for managing the node operation and Kubernetes runtime environment.
kubelet
The kubelet component is an agent runs on each node in the cluster. Kubelet is repsonbsible for maintaining containers operation in a Pod.
kube-proxy
The kube-proxy component is a network proxy that runs each mode in the cluster. This component maintains the network rules for the node. The network rules allow network traffic to the Pod from inside and outside of the cluster.
container runtime
The container runtime component is responsible for running the container software. The container runtime for Kubernetes could be Docker, containerd, or other implementations of the Kubernetes Container Runtime Interface (CRI).
Reference material
In writing this blog post I referenced the official Kubernetes documentation hosted by Cloud Native Computing Foundation (CNCF). I used the CNCF Kubernetes website as a reference for this article (including the diagram above).