Kube Controller Manager
In this tutorial, we are going to discuss Kube Controller Manager in Kubernetes. Kube controller manager manages the various controllers in the Kubernetes.
The controller is a process that continuously monitors the state of the various components within the system and works towards bringing the whole system to the desired functioning state.
Basically, a controller watches the desired state of the objects it manages and watches their current state through the API server. If the current state of the objects it manages does not meet the desired state, then the control loop takes corrective steps to make sure that the current state is the same as the desired state.
For example, the node controller is responsible for monitoring the states of the node and taking the necessary actions to keep the applications running. It does through the Kube API Server.
- The node controller checks the status of the nodes every 5 seconds.
- If the node controller stops receiving a heartbeat from the node, then the node is marked as unreachable.
- The node controller will wait for 40 seconds before it is marked as unreachable.
- After the node is marked as unreachable, it takes 5 minutes to come back up. If it doesn’t, it removes the pod assigned to that node and provisions them to the healthy one.
The next controller is the replication controller.
It is responsible for monitoring the status of the replica sets and ensuring that the desired number of pods are available at all times within the set. If a pod dies, it will create another one.
These 2 are examples of controllers managed by the Kube controller manager. There are many more controllers available in Kubernetes.
These all controllers are packaged into a single process known as Kube controller manager. When you install the controller manager, the different controllers get installed as well.
This controller also performs life cycle functions such as namespace creation and life cycle, event garbage collection, terminated-pod garbage collection, node garbage collection, etc.