Kubernetes Architecture — Processes run on Master Node

In Kubernetes, all of the managing processes are done by Master nodes. They don’t do any of the heavy lifting but only manage the tasks and nodes.

Master nodes schedule pods and monitors for down time. It re-schedules or restarts pods.

The Master nodes are responsible for managing the cluster. Information about the members of the cluster and its health is stored in the Master nodes. All the nodes are monitored by the Master node and if a node fails, the workload of the failed node is transferred to another worker node. It is responsible for the actual orchestration of the containers in the worker nodes.

There are four processes that are run on the Master nodes:

API Servers

Scheduler

Controller Manager

Etcd

API Server

The API server acts as a gateway for all requests that come in. It validates whether the request is authentic or not. There is only one entry point into the cluster which is the API server. Only if the API server authenticates the request, the other processes will proceed.

Scheduler

The scheduler will start the pod in one of the nodes depending upon which node is less busy. It will check the request and see how much CPU is required, depending on that, it will assign the pod to the node that is more available or has less CPU usage.

The scheduler will just decide on which node to put the new pod in, the Kubelet will start the new pod on the request of the scheduler.

Controller Manager

The controller manager detects the state changes like failure in pods/nodes or any other component. It tries to recover the dead pods.

Etcd

The etcd is known as the cluster brain. It is a key-value store of the cluster state. All the cluster changes get stored in the etcd.

The etcd will know information such as what resources are available, if the cluster state changed, if the cluster is healthy etc.

Only based on this data, the other processes will know what has happened. Application data is not stored in the etcd.

Hope this article was useful. Thanks for reading!