Interview Prep/Kubernetes/Deployments and rollouts

How do you pause a rollout, make multiple changes, and resume it?

BeginnerScenarioDeployments and rollouts
Answer

Situation read → You need to change the image, env vars and resources together without triggering three rollouts.

What I'd do →

  1. kubectl rollout pause deploy/web
  2. Apply kubectl set image, kubectl set env, kubectl set resources
  3. Confirm no new ReplicaSet was created with kubectl get rs
  4. kubectl rollout resume deploy/web
  5. Watch kubectl rollout status deploy/web

Why → Pausing stops the controller from reconciling template changes, so all edits land in a single revision.

Interview tip → In GitOps you would simply commit one change, but pause is useful during manual incident work.

All Kubernetes questions Roadmap: Kubernetes core

More on Deployments and rollouts