Controllers and reconciliation

Knowledge Videos

Short animated explainers, organised by subject.

Controllers and reconciliation

The control loop at the heart of Kubernetes: desired vs actual state, Deployments, ReplicaSets and the kubelet.

Transcript

Kubernetes is built on control loops. A controller watches the current state and compares it to the desired state.

A Deployment asks for three replicas. The controller looks, and finds only two pods running.

So it creates one more pod. The loop never stops: observe, compare, act.

That is why Kubernetes is declarative. You state the goal, and controllers keep reality matching it, even after failures.

A Deployment manages a ReplicaSet, and the ReplicaSet manages the pods. Each layer has its own controller.

The kubelet runs a loop too: it makes sure the containers on its node match the pods assigned to it.

Observe. Compare. Act.

More in this series