CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

Deployment Rollouts and Rollbacks

Write a Deployment, follow the ownership chain down to the Pods, roll an image forward and back, read what a revision records, and push a broken image to watch the rollout stall while the old ReplicaSet keeps serving every request.

Workloads Guide 26 of 103 Beginner

ReplicaSet hashes, pod name suffixes, addresses and timings are generated per run. The manifest and the command sequence are what to copy.

Four nodes, so a four-replica Deployment has somewhere to spread.
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

This guide includes

Use this when a workload has to be updated in place and stay recoverable if the update is bad. This matters because a Deployment keeps each revision as its own ReplicaSet, which is what makes an undo cheap rather than a redeploy.

Before you start

  1. Write a Deployment, not a Pod

  2. Follow the ownership chain

  3. Roll the image forward

  4. Read the revision history

  5. Roll back

  6. Scale, and watch the ReplicaSet follow

  7. Break it on purpose

  8. Recover

  9. Clean up

Official sources