Kubectl Rollout Strategy

Zero-downtime deploys: history, pause, resume, and rollback.

  • kubectl rollout
  • canary
  • pause rollout
  • rollout restart
  • zero downtime

Kubectl Rollout Strategy

Zero-downtime deploys: history, pause, resume, and rollback.

Commands

CommandWhat it does
kubectl rollout history deploy/apiRevision list
kubectl rollout status deploy/apiBlock until rollout finishes
kubectl rollout pause deploy/apiCanary: stop after first new pods
kubectl rollout resume deploy/apiContinue a paused rollout
kubectl rollout restart deploy/apiFresh pods, same image (e.g. reload secrets)

Example

kubectl set image deploy/api api=registry/api:v2
kubectl rollout status deploy/api
kubectl rollout undo deploy/api --to-revision=3

FAQ

How do canary releases work here?

Pause mid-rollout, verify metrics on new pods, then resume โ€” or use Argo Rollouts for real weighted canaries.

rollout restart โ€” when?

After Secret/ConfigMap changes or to clear leaked state without changing the image tag.

Soalan Lazim

How do canary releases work here?
Pause mid-rollout, verify metrics on new pods, then resume โ€” or use Argo Rollouts for real weighted canaries.
rollout restart โ€” when?
After Secret/ConfigMap changes or to clear leaked state without changing the image tag.

Kubernetes