DEV Community

Catt
Catt

Posted on

day3: kube controller manager

The Kube Controller Manager manages the various controllers in Kubernetes.

Controllers are:
1 - continually on the lookout for the status of things
2 - take necessary actions to remediate the situation

A controller is a process that continually monitors the state of various components within the system, and it works towards bringing the whole system to the desired functioning state.

For example, with a node controller, it monitors the status of the nodes and takes necessary actions to keep the apps running. It does this through the Kube API server. It checks the nodes every 5 seconds - if a heartbeat is not detected, it waits for 40 seconds before marking it as unreachable. Then it gives it 5 minutes to come back up - if it doesn't, the pods get evicted and provisioned onto healthy nodes if they're part of a replicaset

Another example with a replica controller - these monitor the status of replicasets, ensuring the desired number of pods are available at all times within the set.

The controllers are packaged in a single process known as the Kubernetes Controller Manager. When the Kubernetes Controller Manager is installed, the different controllers get installed as well.

To install the Kubernetes Controller Manager, you can download it from the Kubernetes release page, extract it and run it as a service.

There are additional options to customise your controllers, such as default settings for the node controller to evict your pods, for example.

If set up with kube admin tool, kubeadm deploys a kube controller manager as a pod in the kube-system namespace on the master node's /etc/kubernetes/manifests folder.

Without the kube admin tool, you have to inspect options by viewing the Kube Controller Manager service, located in the services directory. You can also list the processes on the master node with ps -aux | grep kube-controller-manager

That's what I've got for today!

-Catt

Top comments (0)