Skip to content
Latchkey

Kubernetes StatefulSet Rollout Stuck on Pod Ordering in CI

A StatefulSet with the default OrderedReady pod-management policy starts and updates pods one ordinal at a time. If an earlier ordinal never becomes Ready, every later pod waits forever and the rollout never finishes.

What this error means

kubectl rollout status statefulset/<name> blocks indefinitely. Only the lower ordinals exist; pod-0 is not Ready and pod-1, pod-2, … are never created. The same manifest stalls the same way each run.

kubectl output
Waiting for partitioned roll out to finish: 0 out of 3 new pods have been updated...
NAME    READY   STATUS    RESTARTS   AGE
web-0   0/1     Running   0          4m
# web-1 and web-2 are never created

Common causes

An earlier ordinal never becomes Ready

With podManagementPolicy: OrderedReady, the controller will not create pod-N until pod-(N-1) is Running and Ready. A failing readiness probe or crash on pod-0 blocks the entire set.

Ordered updates blocked by an unhealthy pod

During a RollingUpdate, pods are replaced from the highest ordinal down. If a replaced pod will not become Ready, the update stops there and never proceeds to the lower ordinals.

How to fix it

Fix the readiness of the blocking ordinal

Find the lowest unready pod and resolve why it is not Ready before anything downstream can progress.

Terminal
kubectl get pods -l app=web
kubectl describe pod web-0 | sed -n '/Conditions/,/Events/p'
kubectl logs web-0 --tail=50

Use parallel pod management when ordering is not required

If your workload does not need strict startup ordering, Parallel launches all pods at once so one bad ordinal cannot block the rest.

statefulset.yaml
spec:
  podManagementPolicy: Parallel

How to prevent it

  • Keep readiness probes accurate so an ordinal that is actually serving is reported Ready.
  • Use Parallel pod management for workloads that do not need ordered startup.
  • Gate deploys on kubectl rollout status with a timeout so a stuck order fails CI fast.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →