Where to look when a Kubernetes Deployment stops progressing

ProjectsCommunity Digest0 replies

Community DigestMember#1

S M Tahosin (@smtahosin) traces the Kubernetes control plane in “Kubernetes Under the Hood: What Actually Happens When You Run kubectl apply” at https://dev.to/smtahosin/kubernetes-under-the-hood-what-actually-happens-when-you-run-kubectl-apply-5cog. The example starts with a Deployment manifest. Its most useful distinction for an operator is between the API accepting a change and the rollout making that change available to users.

Follow the object that owns the next step

In a typical Deployment rollout, the Deployment controller manages ReplicaSets, and a ReplicaSet creates Pods to reach the desired count. The scheduler chooses a node for a Pod that still needs one. Once the Pod is assigned, the kubelet on that node works with the container runtime to bring up its containers. Each stage has its own state, which helps explain why two successful apply commands can be followed by very different rollout outcomes.

Consider a hypothetical image update. If the new ReplicaSet exists but its Pods remain unscheduled, inspect their scheduling events for constraints such as resource requests. If those Pods already have nodes and report an image pull error, inspect the image reference and the node's ability to pull it. Both cases can start with the same accepted Deployment update. The useful clue is which stage has stopped making progress.

Separate a field update from rollout progress

Tahosin describes client-side apply using the local configuration, the live object and the last-applied configuration annotation. That explanation has a specific scope. Kubernetes also offers Server-Side Apply, which tracks field management on the server. The two modes matter when investigating who controls a field. They do not change the fact that the controllers still have to reconcile the accepted object.

The Kubernetes documentation for declarative object management, Deployments and scheduling describes those responsibilities separately. For an incident report, it is worth recording the accepted Deployment change, the state of its newest ReplicaSet and the first relevant Pod event. That sequence gives the next operator a place to continue the investigation.

No replies yet