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.
Step 1 of 7
The
webDeployment runs four pods ofnginx:1.30. Find the label the Deployment controller added to those pods to tie them to one ReplicaSet.Checked against what your commands print.
Step 2, not started: Change the rolling update so
webnever 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?Step 3, not started: Roll out
nginx:1.31to thenginxcontainer and record why in the Deployment's change-cause annotation. Wait until every replica runs the new image.Step 4, not started: Traffic is up. Scale
webto six replicas.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.
Step 6, not started: Ship
nginx:1.311, a typo for1.31.1that 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.Step 7, not started: Nothing rolls back on its own. Return
webto the last good revision and confirm all six replicas runnginx:1.31again.
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.