Understanding Kubernetes Controller Manager
The Control Loop The Controller Manager is the “brain” of the control plane. It runs various controllers that watch the state of the cluster and make changes to move the actual state toward the desired state. Workflow: Watch: Observe current state via the API Server. Reconcile: Compare actual state (e.g., 2 Pods running) with desired state (e.g., 3 Pods requested). Action: Issue commands to the API Server to reach the target (e.g., create 1 Pod). Key Controllers Deployment Controller: Manages ReplicaSets and ensures the correct number of Pods are running. Node Controller: Monitors node health and handles evictions. Job/CronJob Controllers: Manage one-time or scheduled tasks. Cloud Controller Manager: Integrates with cloud provider APIs to manage storage, load balancers, and network routes. Kubelet and Runtimes Kubelet is the agent running on every node. It receives PodSpecs from the API Server and ensures they are running. ...