Skip to content
Latchkey

kubectl rollout status: Gate Deploys in CI

Block until a Deployment, StatefulSet, or DaemonSet rollout completes or times out.

kubectl rollout status watches a workload until its new revision is fully rolled out, then exits 0. In CI it is the gate that turns a deploy into a pass/fail step: if pods never become ready, it times out non-zero and fails the job.

Common flags

  • RESOURCE/NAME - e.g. deployment/api (positional)
  • -n NAMESPACE - target namespace
  • --timeout=DURATION - fail after this long, e.g. 120s
  • --watch=false - print current status and return immediately

Example in CI

Fail the pipeline if the rollout does not finish in time.

shell
kubectl rollout status deployment/api -n prod --timeout=180s

Common errors in CI

  • error: timed out waiting for the condition - pods never became ready (crash loop or failing probes)
  • deployments.apps "api" not found - wrong name or namespace
  • error: deployment "api" exceeded its progress deadline - progressDeadlineSeconds hit

Key takeaways

  • Blocks until a rollout completes, turning deploys into pass/fail steps.
  • Always set --timeout so a stuck deploy fails the job instead of hanging.
  • A timeout almost always means failing probes or a crash loop.

Related guides

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