CKAD Practice Question 3: Rolling Update Surge Unavailable
Certified Kubernetes Application Developer (CKAD) · Test 1 · question 3 of 10
A Deployment runs 4 replicas of a latency-sensitive API behind a Service. During every image rollout, monitoring records a brief drop in served capacity. The requirement is that at least 4 Ready replicas exist at all times throughout the rollout. The cluster has spare capacity for additional Pods.
Which strategy.rollingUpdate setting satisfies this?
Show answer and explanation
Answer:
maxUnavailable caps how far below the desired replica count the Deployment may drop during an update; maxSurge caps how far above it the Deployment may go. Setting maxUnavailable: 0 guarantees 4 Ready replicas at every moment, and maxSurge: 1 gives the controller room to create a fifth Pod, wait for it to become Ready, and only then terminate an old one. The rollout is slower and briefly uses one extra Pod's worth of resources, which the stem explicitly allows.
Option A is the default behaviour (both fields default to 25%, which rounds to 1 here) and is what produces the observed dip: one old Pod may be removed before its replacement is Ready, leaving 3 available.
Option C is rejected as invalid; maxUnavailable and maxSurge may not both be zero, because the controller would then be unable to remove an old Pod or add a new one and the rollout could never progress.
Option D is the strictest form of the problem, not the fix: with no surge allowed, the only way to make progress is to take an old Pod down first, so availability drops to 3.
Reference: Deployments