How Does Kubernetes Reconcile Desired State? Follow the Control Loop
Kubernetes does not complete the desired state immediately with one command. Multiple controllers continually observe what is declared in the API and reduce differences from what currently exists, by creating or changing the resources they own. This repeated process is called **reconciliation** or a **control loop**. Controllers usually do not run containers directly. They change API objects, after which components such as the scheduler and each node's kubelet continue the work. A request can therefore be accepted before an application is ready, and delays or failures can occur in between.
What are desired state and actual state?
When you declare three replicas and a Pod template in a Deployment, those values are the desired state stored in the Kubernetes object's .spec. The cluster's current state includes observations such as how many Pods exist, whether they have been assigned to nodes, and whether their containers are running and ready. An object's .status is a common place to report such observations, but it is not a perfect, instantaneous ledger of every real-world condition. Reports can update asynchronously.
After you submit desired state to the API, the API server checks the request's structure and permissions and stores the object. Success means the request was accepted; it does not mean that Pods are already running or that the service is responding to users. The work that follows depends on which controllers manage the relevant resources.
How do controllers reduce the difference?
Kubernetes controllers observe the API objects and related state they are responsible for. When they detect a difference, they make a change or ask the API server to make one, then observe the updated state again. This is a continuing loop, not a script that runs once. Each controller watches and manages its own resources; a single controller does not align the whole cluster at once.
For a Deployment that should maintain three replicas, several responsibilities connect:
Deployment spec.replicas = 3
│
▼
Deployment controller: manages a ReplicaSet for the Pod template
│
▼
ReplicaSet controller: creates/deletes owned Pods to reach 3
│
▼
scheduler: selects a node for each unscheduled Pod
│
▼
node kubelet and container runtime: start the Pod and report statusFor example, if one running Pod is deleted, the ReplicaSet observes that it owns only two and asks for a new Pod to bring the count back to three. The scheduler selects a node for the new Pod, and that node's kubelet asks the runtime to start its containers. Maintaining “three replicas” is therefore not one Deployment controller directly starting three containers; it is the result of multiple control loops handing off their responsibilities. A Deployment normally manages its ReplicaSet, so you generally should not manage that ReplicaSet directly.
Clients can observe API resources by listing their current state and then watching for later changes. Kubernetes list/watch provides a way to notice changes; a notification does not itself modify a resource. The controller must inspect the relevant state again and decide what adjustment to make. Internal implementation details can differ between controllers.
Why might state take time to converge or remain different?
Reconciliation is asynchronous. Creating objects, scheduling Pods, pulling images, starting containers, and reporting readiness all take time. Even while control loops continue to run, the cluster as a whole does not have to reach one perfectly fixed state at every instant. State can keep changing while work is in progress and useful adjustments are being made.
If the requested state cannot be realized in the current cluster, the difference can remain even when controllers keep trying. For example, a lack of resources can leave a Pod Pending, while a ResourceQuota or policy can reject Pod creation. A Deployment can also stall if an image is unavailable or the container cannot start because of permissions or configuration. Controllers do not create missing capacity from a declaration or automatically fix application defects. Inspect progress and events for the specific cause.
Each controller also adjusts only the area it owns. A Deployment controller manages its Pod template and replicas; it does not guarantee that user requests reach the application. The scheduler chooses nodes, and kubelets run assigned Pods. A failed Service connection may belong to a different path involving Pod readiness, EndpointSlices, a network plugin, or policy. Inspect the relevant layers together. For a broader component map, see the Kubernetes control plane overview.
What should you inspect when state does not match?
The commands below are observational examples; they were not run against a cluster. In a real cluster, first confirm that the kubeconfig context and namespace point to the intended target.
kubectl config current-context
kubectl get deployment api
kubectl get replicasets,pods -l app=api -o wide
kubectl describe deployment api
kubectl get events --sort-by=.metadata.creationTimestamp
kubectl rollout status deployment/api --timeout=120sCompare the Deployment's .spec.replicas with the replica and availability counts reported in .status, then follow the ReplicaSet and Pods. rollout status helps determine whether an update is progressing or complete. Output can vary with cluster version, permissions, and resource settings.
**Desired and current Deployment replica counts differ:** inspect the events and conditions from `describe deployment`. Follow ReplicaSets and Pod states to see what the controller created next. Before changing a Deployment-owned ReplicaSet manually, inspect the original Deployment `.spec` and events.
**A Pod is `Pending` and has no assigned node:** inspect scheduler events for resource requests, node-selection rules, taints/tolerations, or quota. The container runtime might not have become involved yet.
**A Pod has a node but its container is not ready:** use Pod events to check image pulling, volume setup, permissions, probes, and runtime problems. Check kubelet/runtime status and node resources too.
**A new rollout is stalled:** find why Pods in the new ReplicaSet are not becoming ready and inspect Deployment conditions. Correct the image reference or application configuration, or follow an approved rollback procedure if the version change was unintended. Deleting unready Pods manually does not fix the underlying cause.
**Pods are ready but the service cannot be reached:** separately check the Service selector and EndpointSlices, network policy, Ingress, and application response. Having the desired replica count does not prove that the user traffic path works.
How is kubectl apply different from reconciliation?
kubectl apply is a client action that submits a declared object to the Kubernetes API. Reconciliation is the ongoing work of controllers that observe the desired state stored in the API and bring the resources they own closer to it. Apply success confirms that the API processed the request; it does not replace rollout completion or application-health checks. Before changing a manifest, review the proposed difference with kubectl diff -f <manifest.yaml>. Afterward, check Deployment and Pod state and the application's actual response separately. In production, verify context, namespace, impact, and rollback options before applying a change.
Key points
Kubernetes operates by having multiple controllers continually reduce differences between declared and current state. Each controller owns only certain resources, while other components handle scheduling and node execution. Accepted desired state does not become actual state instantly. When a difference remains, inspect observations through Deployment → ReplicaSet → Pod → node execution → service connectivity, and address the resource, policy, image, or application issue at the responsible layer.
Sources
[Kubernetes Controllers](https://kubernetes.io/docs/concepts/architecture/controller/)
[Kubernetes Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)
[Kubernetes ReplicaSet](https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/)
[Kubernetes API Concepts](https://kubernetes.io/docs/reference/using-api/api-concepts/)
[Kubernetes control plane overview](https://knowledge.linkspot.net/ko/articles/315cd99a-2038-4e29-9fae-378301432e09)
Scope: reconciliation by built-in controllers, the Deployment–ReplicaSet–Pod chain, interpreting non-convergent states, and read-oriented diagnostics. Official Kubernetes documentation reviewed on 2026-11-23. Commands are illustrative and were not run against a cluster. Custom-controller queue/retry implementation and GitOps tools are outside this scope.