Skip to content

Rollout stuck: deployment exceeded its progress deadline

Kubernetestested on RKE2 v1.37.2

A Deployment rollout doesn't end with an error but with a condition: Progressing=False, reason ProgressDeadlineExceeded. The controller doesn't abort, it only reports – the service keeps running on the old version.

Symptom

kubectl -n tag17 rollout status deploy/web --timeout=90s; echo "rc=$?"
kubectl -n tag17 get deploy web
error: deployment "web" exceeded its progress deadline
rc=1
NAME   READY   UP-TO-DATE   AVAILABLE   AGE
web    3/3     1            3           34s

3/3 ready, but only one UP-TO-DATE – the service runs, the update doesn't. In the course the deadline is shortened to 30 seconds; the default is 600.

Diagnosis

ReplicaSets, pods and the conditions of the Deployment.

kubectl -n tag17 get rs
kubectl -n tag17 get pods
J='{range .status.conditions[*]}{.type}={.status} {.reason}{"\n"}{end}'
kubectl -n tag17 get deploy web -o jsonpath="$J"
NAME             DESIRED   CURRENT   READY   AGE
web-5ccbc58945   3         3         3       37s
web-6577c6f697   1         1         0       35s
NAME                   READY   STATUS         RESTARTS   AGE
web-5ccbc58945-fmq5t   1/1     Running        0          37s
web-5ccbc58945-gbwk4   1/1     Running        0          37s
web-5ccbc58945-j9nq2   1/1     Running        0          37s
web-6577c6f697-fj6g4   0/1     ErrImagePull   0          35s
Available=True MinimumReplicasAvailable
Progressing=False ProgressDeadlineExceeded

Causes

New pod never readyThe new ReplicaSet gets no ready pod

In the course it's an image tag that doesn't exist: the new pod hangs in ErrImagePull. The pods of the new ReplicaSet show the reason, not the Deployment.

RollingUpdateNo old pod is removed

The default strategy (maxSurge 25 %, maxUnavailable 25 % – rounded down to zero with three replicas) starts one new pod and removes no old one while the new one isn't ready. After progressDeadlineSeconds the controller sets ProgressDeadlineExceeded.

Fix

Go back to the last working revision. If the fault came in via kubectl apply, fix the file as well – otherwise the next apply brings it back.
kubectl -n tag17 rollout history deploy/web
kubectl -n tag17 rollout undo deploy/web 2>&1 | tail -1
kubectl -n tag17 rollout status deploy/web
deployment.apps/web
REVISION  CHANGE-CAUSE
1         <none>
2         <none>
deployment.apps/web rolled back
deployment "web" successfully rolled out
▶
Break it yourself and find it – free
Debugging Kubernetes, day 17: stuck rollouts, blind HPAs, Helm in pending-upgrade and jobs that give up – with a drill to reproduce each one.
Go to day 17 →

FAQ

Does Kubernetes abort the rollout after the deadline?

No. The controller only sets Progressing=False with ProgressDeadlineExceeded. The old pods keep running, the new one stays where it is.

Why does rollout undo print a warning?

In 1.37, rollout undo warns that the annotation from kubectl apply doesn't follow. If you work with apply, fix the file as well.

Related error patterns

More