Introduction to Kubernetes cluster
We know Kubernetes is basically a container orchestrator tool and this tool exist in form of a cluster. That means when we install this Kubernetes tool, we will get a Kubernetes cluster. And Kubernetes cluster is nothing but a group of VMs/physical machines/nodes where some are master node and some are worker node. The main purpose of Kubernetes cluster is to host the application in the form of containers, and it will be automated process so that we can easily deploy as many instance of application as required.
(Note: We can create Kubernetes cluster using one VM/node as well, where the same VM/node will work as master node and worker node).
In this post, we will discuss Kubernetes clusters in details and its various components. If you need a bit of background of Kubernetes, then please go through the below post.
Components in Kubernetes cluster
In Kubernetes cluster we have two types of components –
- Control plane components
- Data plane components
Control plane components
Every cluster has at least one master and one worker node. Master node (s) manage the cluster and worker node handles the actual work load which run the containerized applications. Some major task which master node performs are –
- Master node (s) stores all the info related to the worker node and containers running on the worker nodes.
- Master node (s) plans which container goes to in which worker node.
- Master node(s) is/are responsible for monitoring the containers and nodes etc.
The master node (s) does all the above task using a group of components, all those components together known as control plane components. And the control plane is like the brain of Kubernetes cluster.
Various components of control plane are –
- kube-apiserver – This is the primary management component in Kubernetes. It is responsible for orchestrating all the operation within the cluster.
- etcd cluster – It is a kind of highly available database which stores all the information about various configuration and cluster state (like which container is running in which node etc.).
- kube-scheduler – It is responsible for resource distribution. It checks for all constraints and assign the correct pod to the required node.
- Controller-Manager – The controller manager runs the core control loops of the cluster, it continuously watches the cluster state and drive it towards the desired state. Fundamentally, the controller manager has various controller inside it which are responsible for various process. Some controllers are –
- Namespace controller
- Service controller
- Deployment controller
- Replication controller etc.
- Container runtime engine – All the control plane components has to be in container which requires a container engine to be present in all the nodes including master nodes. So the container runtime engine is a very important component of the control plane.
Data plane components
Data plane is like the body of the Kubernetes cluster. Below components are part of data plane –
- Worker nodes – Worker nodes or the VMs executes the instruction from the control plane.
- kubelet – It is an agent which runs on each node in Kubernetes cluster, it listens instruction from kube-apiserver and deploys/destroys containers on node as required. The kube-apiserver periodically fetches status of the containers from kubelet to monitor their status.
- kube-proxy – It is a service which runs on the worker node and enables the communication between the containers of different worker nodes.
In the above diagram, we can see the various control plane and data plane components of Kubernetes cluster.
Thank You for your time.
If you are interested in learning DevOps, please have a look at the below articles, which will help you greatly.
- Kubernetes Series: Part 1 – Introduction to Kubernetes | Background of Kubernetes
- Kubernetes Series: Part 3 – What is Minikube and How to create a Kubernetes cluster (on Linux) using Minikube?
- Introduction to Ansible | High Level Understanding of Ansible
- What is “Monitoring” in DevOps? Why do we need to Monitor App/DB servers, Transactions etc.?
- What is End-to-End Monitoring of any web application and Why do we need it?
- DevOps Engineer or Software Developer Engineer which is better for you?- Let’s discuss