liveBook · Manning

Reconciliation

As explained in Kubernetes in Action, Second Edition

A reconciliation loop is a repeated control process that compares observed state with desired state and makes corrective changes.

Reconciliation is a repeated control process: a controller observes actual state, compares it with desired state, and makes corrective changes until they match. This loop lets Kubernetes maintain workloads without requiring every change to be performed manually. section 14.3.1 section 14.5

A reconciliation loop typically performs these operations:

ReplicaSet replica repair

A ReplicaSet specifies a desired number of pods. If fewer pods exist, its controller creates replicas from the Pod template; if too many exist, it deletes the excess. Changing the replica count causes the controller to repeat the same correction process. section 14.3.1 section 14.5

Operator-managed MongoDB

An operator reconciles a MongoDBCommunity object by creating and maintaining a StatefulSet, Services, and Secrets. Updating the members field causes the operator to scale the StatefulSet and reconfigure the MongoDB replica set. section 16.4.2

Figure 14.5 A controller's reconciliation control loop
figure

Use the controller-loop diagram to trace observation, desired-state comparison, and corrective action as a repeating lifecycle. section 14.3.1

How Kubernetes in Action, Second Edition covers it

How deep it goes
Explains observation, comparison, creation, deletion, and repeated correction, but does not detail controller implementation internals.
Examples
Uses ReplicaSet replica counts, DaemonSet per-node pods, and an operator-managed MongoDB deployment as concrete examples.
What it assumes
Assumes Kubernetes objects and Pods, while introducing controllers through ReplicaSets and related workload resources.
What you can do after
Apply via kubectl by changing desired Kubernetes objects and observing controllers create, remove, or resize dependent resources.
How it connects
Connects controllers with desired state, Pods, ReplicaSets, DaemonSets, StatefulSets, operators, and owner references.

Also explained in

Compare how 7 books explain reconciliation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.