Roll out, stall and undo

  • 14 min
  • 7 steps
  • Pods and workloads

Steps

0 of 7 done

Tune a Deployment to keep full capacity, ship a release with a change cause, scale without a new revision, then watch a typo stall a rollout and undo it.

  1. Step 1 of 7

    The web Deployment runs four pods of nginx:1.30. Find the label the Deployment controller added to those pods to tie them to one ReplicaSet.

    Checked against what your commands print.

  2. Step 2, not started: Change the rolling update so web never drops below four available pods during a rollout and adds at most one extra pod at a time. Check the rollout history afterwards: did this change create a revision?

  3. Step 3, not started: Roll out nginx:1.31 to the nginx container and record why in the Deployment's change-cause annotation. Wait until every replica runs the new image.

  4. Step 4, not started: Traffic is up. Scale web to six replicas.

  5. Step 5, not started: List the rollout history. Count the revisions: one for the original template and one for the image change, with your change cause on the second. Scaling and the strategy change added none.

  6. Step 6, not started: Ship nginx:1.311, a typo for 1.31.1 that was never pushed. Watch the ReplicaSets and pods, then wait until the Deployment itself reports that the rollout has stopped making progress. All six old pods should still be serving.

  7. Step 7, not started: Nothing rolls back on its own. Return web to the last good revision and confirm all six replicas run nginx:1.31 again.

Lab terminal

Cluster time 50 seconds
kind cluster kx, Kubernetes 1.37.
Each step is checked as you work.
​
Tab completes. Up and Down recall.
Type help for more.
Terminal keys

Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.