Prompt
Why is my Kubernetes rollout taking forever?
Latest observation
A Kubernetes rollout usually “takes forever” for one of a few common reasons. The fastest way to narrow it down is to check where it’s stuck: deployment, replica set, pod scheduling, image pull, readiness, or termination.
Quick checks
1) Look at the deployment status
kubectl rollout status deployment/<name> -n <ns>
kubectl describe deployment <name> -n <ns>
Pay attention to:
ProgressingAvailableProgressDeadlineExceeded- replica counts like
UpdatedReplicas,ReadyReplicas,UnavailableReplicas
2) Check the pods
kubectl get pods -n <ns> -o wide
kubectl describe pod <pod> -n <ns>
kubectl logs <pod> -n <ns>
Common pod states:
Pending→ scheduling/resource/constraint issueContainerCreating→ volume/image/network setup issueImagePullBackOff/ErrImagePull→ bad image, registry auth, networkCrashLoopBackOff→ app starts but crashesRunningbut notReady→ readiness probe failing
Most common causes
1) Readiness probe is failing
If your app is up but not passing readiness checks, Kubernetes won’t mark the rollout complete. Check:
- probe path/port
- startup time longer than probe thresholds
- app dependencies not ready yet
2) Not enough cluster capacity
Pods can’t schedule because of CPU/memory limits or node constraints. Look for events like:
Insufficient cpuInsufficient memorynode(s) didn’t match node affinity/selectortaints/tolerationsissues
3) Image pull problems
If the new image can’t be pulled, rollout stalls. Check:
- image tag exists
- registry credentials
- image pull secret
- network access to registry
4) Old pods are slow to terminate
Rolling updates wait for old pods to exit, especially if:
terminationGracePeriodSecondsis large- app ignores SIGTERM
- preStop hook sleeps too long
maxUnavailable=0andmaxSurge=0-like constraints slow replacement
5) Deployment strategy settings are too strict
Review:
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
If maxUnavailable is low and new pods take a long time to become ready, the rollout will be slow by design.
6) HPA or other controllers are interfering
Autoscalers can change replica counts while rollout is in progress, which can make it look stuck or noisy.
7) Service mesh / sidecar startup delays
Istio/Linkerd or similar can delay readiness, especially if sidecars need to initialize or probes are misconfigured.
What to inspect first
Run:
kubectl get deploy,pods -n <ns>
kubectl describe pod <problem-pod> -n <ns>
kubectl get events -n <ns> --sort-by=.lastTimestamp
If you want a fast diagnosis
Paste these outputs and I can tell you what’s blocking the rollout:
kubectl rollout status deployment/<name> -n <ns>
kubectl describe deployment <name> -n <ns>
kubectl get pods -n <ns> -o wide
kubectl describe pod <pod> -n <ns>
kubectl get events -n <ns> --sort-by=.lastTimestamp
If you want, I can also give you a decision tree for diagnosing rollout delays in under 2 minutes.
Brands