Trace reconciliation from the API object to the Pod condition
Reconciliation: the behavior of a controller that continuously reduces the gap between the desired state and the observed state.
Kubernetes is not a tool that sends commands straight to nodes; it is a system in which the desired state is written to API objects and many controllers converge the actual state onto it. spec, status, condition, and event are different pieces of evidence.
The Deployment controller creates a ReplicaSet, the scheduler picks a node for unscheduled Pods, and the kubelet reconciles the container runtime with the actual Pod. Success at one controller does not guarantee success at the next boundary.
Do not conclude that everything is fine from the few columns of kubectl get. Read how far the control loop has progressed from generation, observedGeneration, condition reasons, events, and owner references.
In the training example replicas was submitted as 3 and the API write succeeded, but only 2 Pods are Ready. A success response from the API means the request was accepted, not that all of the desired workload is available. Read the scheduling events of the pending Pod and the readiness of the existing replicas to find the layer where the gap appeared. Manually deleting Pods that the controller recreates does not change the desired state.
- Why does this happen?
- The Deployment controller creates the ReplicaSet, the scheduler picks a node for unplaced Pods, and the kubelet works with the container runtime to bring the actual Pod into line. Success in one controller does not guarantee success at the next boundary.
- When is it a problem?
- If observedGeneration lags or a condition fails, there are insufficient grounds to proceed.
- Common beginner misconceptions
- If you edit a generated ReplicaSet or Pod directly, the controller may overwrite your change. Fix the higher-level object that owns the desired state, along with the deployment source.
- How to verify it yourself
- Compare metadata generation with status observedGeneration. Trace the Deployment→ReplicaSet→Pod relationship through ownerReferences.