A Deployment named 'web-app' is configured with rolling update strategy. You run 'kubectl describe deployment web-app' and see 'RollingUpdateStrategy: 25% max unavailable, 25% max surge'. You have 4 replicas. You update the image. How many pods will be unavailable during the rollout at most?
25% of 4 is 1, so at most 1 pod can be unavailable.
Why this answer
With a rolling update strategy of 25% max unavailable and 25% max surge on a Deployment with 4 replicas, the maximum number of pods that can be unavailable during the rollout is 1. This is because 25% of 4 replicas equals 1, and Kubernetes rounds down for max unavailable, ensuring at least 3 pods remain available throughout the update.
Exam trap
The trap here is that candidates often mistakenly round up the max unavailable value (e.g., 25% of 4 = 1, but some think it could be 2 due to misinterpreting rounding rules), or they confuse max unavailable with max surge, leading to incorrect counts of unavailable pods.
How to eliminate wrong answers
Option A is wrong because 0 unavailable pods would only be possible if max unavailable were set to 0% or 0, but here it is 25%, allowing some pods to be taken down during the update. Option B is wrong because 4 unavailable pods would mean all replicas are down, which violates the rolling update strategy that guarantees a minimum available count (75% of 4 = 3 pods). Option C is wrong because 2 unavailable pods would exceed the 25% max unavailable limit (25% of 4 = 1), and Kubernetes enforces this limit by rounding down to the nearest integer, not up.