![[Pasted image 20250206063642.png|controller-manager]]
In Kubernetes we define the **desired state** and it tries to reach that state. For example, if we define that 5 pods are needed and suddenly we lose 2 of them, Kubernetes tries to add them back.
`controller-manager` tries to monitor and manage the desired state of configuration.
Each controller checks the state in a interval and if it is not the desired state, it notifies the [[apiserver]] to fix it.
A **custom** controller can be defined in order to monitor a custom resource.
#### cloud controller-manager
When we get the cluster from a cloud provider, some of them controllers can be handles by that. (e.g. node-controller)