When your CI/CD updates the Deployment's container image, you want to ensure at least one new replica is started while keeping old replicas until the new one is healthy. What Deployment strategy change achieves this?
Choose an answer
Tap an option to check your answer.
Correct answer: Set strategy to RollingUpdate with maxSurge: 1 and maxUnavailable: 0..
Why this is the answer
The correct strategy is RollingUpdate with maxSurge: 1 and maxUnavailable: 0. RollingUpdate ensures that new pods are gradually rolled out, replacing old ones without downtime. Setting maxSurge: 1 means that Kubernetes can create one new pod above the desired replica count, allowing the new version to start and become healthy before any old pods are terminated. Setting maxUnavailable: 0 ensures that no pods are taken down until the new ones are ready, guaranteeing continuous service availability. The Recreate strategy would terminate all old pods before creating new ones, leading to downtime. Setting maxUnavailable: 1 would allow one pod to be unavailable, which might mean an old pod is terminated before a new one is ready, potentially causing a brief service interruption. Setting maxSurge: 0 would prevent any new pods from starting until an old one is terminated, which, combined with maxUnavailable: 0, would deadlock the update.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed