Hands-on Lab·Certified Kubernetes Administrator
Rolling Update Strategy: maxSurge and maxUnavailable
Poll a Deployment through two rollouts and read the counts. maxSurge shows up as READY exceeding the replica count; Recreate shows up as AVAILABLE dropping to zero. The same three columns tell you which strategy is in force.
Workloads Guide 27 of 103 Intermediate
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 30 min
Sampled every few seconds, so the exact rows depend on timing. The shapes are what to learn.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when you need to know how much capacity a rollout adds or removes while it runs. This matters because maxSurge and maxUnavailable default to 25% each without anyone setting them, and those two numbers decide whether users notice a deploy at all.
- reading back the RollingUpdate strategy and the 25% defaults nobody chose
- polling a Deployment through a rollout and watching READY exceed the replica count
- seeing maxSurge and maxUnavailable in the live counts rather than in the manifest
- switching to the Recreate strategy and watching availability hit zero
Before you start
- The Deployments guide, for
rollout status,undoand revision history. - The ReplicaSets guide, since a rolling update is two ReplicaSets existing at once.
- A scratch namespace with a Deployment to update.
-
The defaults, and why 25% is a decision
-
maxSurge, visible as READY exceeding the replica count
-
Recreate, and availability hitting zero