Rollout Stuck? How to Unstick a Kubernetes Deployment
Progress deadline exceeded, old pods never terminate, new ReplicaSet at zero — a calm order of operations before rollback or delete.
You shipped a new image. The rollout never finishes.
kubectl rollout status deployment/web -n prodWaiting for deployment "web" rollout to finish: 1 old replicas are pending termination...Or:
error: deployment "web" exceeded its progress deadlineWhat Deployment is waiting for
A Deployment rollout completes when new ReplicaSet pods become Available and old pods terminate according to strategy:
- RollingUpdate: respects
maxUnavailable/maxSurge - Recreate: kills all old before new (brief downtime)
Stuck usually means: new pods not Ready, old pods won't drain, or PDB / quotas block progress.
Diagnostic sequence
kubectl get rs -n prod -l app=web
kubectl get pods -n prod -l app=web -o wide
kubectl describe deployment web -n prodCompare old vs new ReplicaSet pod counts and Ready state.
Then for failing new pods:
kubectl describe pod <new-pod> -n prod
kubectl logs <new-pod> -n prod --previousCommon blockers: probe failure on new image, insufficient CPU, PVC still attaching, ProgressDeadlineSeconds too aggressive.
Safe recovery options
| Situation | Sensible move |
|---|---|
| Bad new image | `kubectl rollout undo deployment/web -n prod` |
| Need history | `kubectl rollout history` then undo to revision |
| Paused by human | `kubectl rollout resume deployment/web` |
| Single bad pod | Fix manifest; let controller reconcile |
Avoid first: deleting the Deployment (destroys revision history), random scale without reading Events, or --force on everything.
CKAD pattern
Exams often combine rollout status + describe new pod + undo. Speed comes from knowing get rs / get pods before undo.
Drill Deployment Rollouts scenarios on Decision Trainer — timed exam sprints included in CKAD Exam Prep.