Controllers and Reconciliation
Cheat sheet · https://pcornel.dk/topic.php?topic=6143
Answer
Controllers continuously compare desired state (spec) with actual state (status) and act to close the gap — the reconciliation loop behind Deployments, ReplicaSets, Services and operators.
Remember
Changing a managed object by hand is undone by its controller — change the owner (Deployment, Helm release, GitOps source). Owner references show who manages an object.
First checks
kubectl get <obj> -o jsonpath='{.metadata.ownerReferences}'— first check for this topickubectl get pods -o wide— pods, status, node, IPkubectl describe pod <pod>— events and conditionskubectl logs <pod> [-c <c>] [--previous]— container logs (incl. previous crash)kubectl get events --sort-by=.lastTimestamp— recent cluster events
Commands
kubectl describekubectl get <obj> -o yaml
Verify in this order
spec stored → controller watches → acts → status updated → loop
Where it usually breaks
Editing a ReplicaSet owned by a Deployment is reverted.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6143