Controller Manager

A controller manager runs controllers, it is a daemon that embeds the core control loops shipped with k8s. In K8s, a controller is a control loop that watches the shared state of the cluster through the apiserver and makes changes attempting to move the current state towards the desired state. Examples of controllers that ship with K8s today are the replication controller, endpoints controller, namespace controller, and serviceaccounts controller.

kube-controller-manager

Logically, each controller is a separate process, but to reduce complexity, they are all compiled into a single binary and run in a single process.

These controllers include:

  • Node Controller: Responsible for noticing and responding when nodes go down.

  • Replication Controller: Responsible for maintaining the correct number of pods for every replication controller object in the system.

  • Endpoints Controller: Populates the Endpoints object (that is, joins Services & Pods).

  • Service Account & Token Controllers: Create default accounts and API access tokens for new namespaces.

Click here for more details from official doc.

cloud-controller-manager

cloud-controller-manager runs controllers that interact with the underlying cloud providers. The cloud-controller-manager binary is an alpha feature introduced in Kubernetes release 1.6.

cloud-controller-manager runs cloud-provider-specific controller loops only. You can disable the controller loops by setting the --cloud-provider flag to external when starting the kube-controller-manager.

You must disable these controller loops in the kube-controller-manager, if you are planning to run cloud-controller-manager.

These cloud-specific control loops from cloud-contoller-manager were originally in the kube-controller-manager. Since cloud providers develop and release at a different pace compared to the Kubernetes project, abstracting the provider-specific code to the cloud-controller-manager binary allows cloud vendors to evolve independently from the core Kubernetes code.

cloud-controller-manager allows cloud vendors code and the Kubernetes code to evolve independent of each other. In prior releases, the core Kubernetes code was dependent upon cloud-provider-specific code for functionality. In future releases, code specific to cloud vendors should be maintained by the cloud vendor themselves, and linked to cloud-controller-manager while running K8s.

The following controllers have cloud provider dependencies:

  • Node Controller: For checking the cloud provider to determine if a node has been deleted in the cloud after it stops responding

  • Route Controller: For setting up routes in the underlying cloud infrastructure

  • Service Controller: For creating, updating and deleting cloud provider load balancers

  • Volume Controller: For creating, attaching, and mounting volumes, and interacting with the cloud provider to orchestrate volumes

Last updated