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=180sCommon 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
kubectl set image: Update Deployment Images in CIUpdate a container image on a Deployment from CI: syntax, a rollout example, and the errors that come from wr…
kubectl rollout undo: Roll Back Deploys in CIRoll back a Kubernetes Deployment from CI: revision flags, an automated-rollback example, and the errors you…
kubectl wait: Block on Conditions in CIWait for a Kubernetes condition in CI: --for and --timeout flags, a readiness-gate example, and the timeout e…