The knowledge base / All cheat sheets
● Always in your toolkitAbout the project ↗

Kubernetes deployment rollout investigation cheat sheet

Inspect deployment rollout status, ReplicaSets, pod readiness and events during a stalled release.

kubectl and read access to Deployments, ReplicaSets, Pods and Events in the target namespace.

Updated · Kubernetes · 6 min read

CommandWhat it does
kubectl config current-contextConfirm the selected cluster
kubectl get deployment web -n production -o wideInspect deployment replica counts
kubectl rollout status deployment/web -n production --watch=falseRead current rollout status
kubectl get replicasets -n production -l app=webCompare ReplicaSet revisions
kubectl get pods -n production -l app=web -o wideInspect selected pod state
kubectl describe deployment web -n productionRead conditions and recent events

Walkthrough

Replace production, web and app=web with the real namespace, Deployment and verified selector. These commands inspect resources and do not undo a rollout.

Step 1: Confirm the selected cluster

kubectl config current-context

Compare the locally configured context with the approved cluster inventory before collecting evidence; similar context names can refer to different environments.

Step 2: Inspect deployment replica counts

kubectl get deployment web -n production -o wide

Compare desired, ready, up-to-date and available replicas with the intended rollout. A Deployment object existing does not prove all new pods are serving.

Step 3: Read current rollout status

kubectl rollout status deployment/web -n production --watch=false

This returns the current status without an ongoing watch. If the rollout changes, repeat the command and correlate the output with Deployment conditions and event timestamps.

Step 4: Compare ReplicaSet revisions

kubectl get replicasets -n production -l app=web

Use the actual Deployment selector, which may differ from this example. Compare desired, current and ready counts to distinguish old replicas from the newest rollout.

Step 5: Inspect selected pod state

kubectl get pods -n production -l app=web -o wide

Review readiness, restarts and node placement for the selected pods. Running is not equivalent to ready; inspect the specific pod further when status or readiness is unexpected.

Step 6: Read conditions and recent events

kubectl describe deployment web -n production

Compare available and progressing conditions and recent events with the rollout window. Events are temporary and can be aggregated; use centralized logs for older evidence.

WORKED INCIDENT

Practical case: A rollout stalls with unavailable replicas

Fictional teaching scenario; observations are examples, not captured production output.

Situation

A new application release remains partially available after deployment.

Investigation sequence

1. Confirm the selected cluster

kubectl config current-context

Verify the current context and intended namespace before inspecting the deployment.

2. Inspect deployment replica counts

kubectl get deployment web -n production -o wide

Record desired and available replica counts during the incident.

3. Compare ReplicaSet revisions

kubectl get replicasets -n production -l app=web

Compare old and new ReplicaSet counts using the verified selector.

4. Inspect selected pod state

kubectl get pods -n production -l app=web -o wide

Inspect readiness and restart status for the pods belonging to the new revision.

Example findings

Illustrative findings: old replicas remain ready while the new ReplicaSet has zero ready pods.

Interpret the findings

The rollout is waiting on new replicas in this example. Pod events and logs are needed to distinguish image, configuration, scheduling or readiness failures.

Verify the outcome

After the application owner resolves the cause, repeat the rollout status and confirm expected available replicas and a normal application request.

Escalation handoff

Send Deployment and ReplicaSet identities, conditions and sanitized event times to the platform owner.

Primary references

Documented reference; examples above are teaching scenarios. Confirm behavior against your deployed version.