CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Application Developer

Deployment Rollback and Revision History

`kubectl rollout undo` goes back one step, which is rarely the step you want. This builds three labelled revisions, inspects one without applying it, rolls back to a named revision, and shows the renumbering that follows - the detail that makes people think the rollback did not work. It finishes with pause and resume, which turn three edits into one rollout.

Application Deployment Guide 19 of 44 Intermediate

Written against the versions above. `CHANGE-CAUSE` comes from the `kubernetes.io/change-cause` annotation and nothing sets it for you. Setting it after each change, as here, is what makes `rollout history` worth reading; without it every row says `<none>` and the history tells you only how many times something changed.

A two-replica Deployment on the worker nodes. Nothing here depends on placement.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. Three revisions, each one labelled

  2. Look before you leap

  3. Undo to a named revision, and watch the numbering

  4. Pause, make several changes, resume

Official sources