Courseiva
Application DeploymentmediumMultiple ChoiceObjective-mapped

CKAD Application Deployment Practice Question

You have a Deployment named 'frontend' with 4 replicas. You want to perform a rolling update with the following constraints: the number of pods above the desired count should never exceed 1, and the number of unavailable pods should never exceed 0. Which deployment strategy configuration achieves this?

⚠ Common exam trap

Candidates often confuse `maxSurge` and `maxUnavailable` as percentages versus absolute values, or they mistakenly think `Recreate` can achieve zero downtime, when in fact it causes complete unavailability during the update.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

strategy: rollingUpdate: {maxSurge: 1, maxUnavailable: 0}

Setting `maxSurge: 1` ensures that during a rolling update, at most one additional pod is created above the desired replica count of 4, and `maxUnavailable: 0` guarantees that no pods are taken down until the new ones are ready. This satisfies the constraints of never exceeding one extra pod and never having unavailable pods.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • strategy: rollingUpdate: {maxSurge: 2, maxUnavailable: 0}

    Why it's wrong here

    With maxSurge: 2, Kubernetes may schedule up to two extra pods above the desired size of 4, creating a transient peak of 6 pods. The requirement permits only one extra pod, so this exceeds the surge budget even though maxUnavailable: 0 keeps existing replicas available. This also risks overloading resources and any downstream services during the update.

  • strategy: rollingUpdate: {maxSurge: 25%, maxUnavailable: 25%}

    Why it's wrong here

    Using 25% for both settings on a 4-replica Deployment calculates to maxSurge=1 and maxUnavailable=1 (percentages are rounded up for surge and down for unavailability). While the surge part satisfies the 'one extra pod' constraint, the maxUnavailable=1 allows one replica from the old ReplicaSet to be terminated before the new one is ready, dropping available capacity from 4 to 3 and violating the requirement of zero unavailable pods.

  • strategy: rollingUpdate: {maxSurge: 1, maxUnavailable: 0}

    Why this is correct

    This is the correct configuration because maxSurge: 1 caps the total number of pods at one beyond the desired 4, so at most 5 pods run during the update. Meanwhile, maxUnavailable: 0 forbids terminating any old pod until a new pod has become Ready, ensuring at least 4 pods are always available to serve traffic. Together they enforce exactly the stated constraints: no more than one extra pod and zero downtime.

  • strategy: type: Recreate

    Why it's wrong here

    The Recreate strategy first terminates all existing pods from the old ReplicaSet and only then creates the new pods, producing a period with no running replicas and complete service downtime. It does not use the rolling update surge/unavailable budgeting at all, so it can never satisfy the availability requirement that all original replicas remain serving during the deployment.

About these practice questions

One of 160 original CKAD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.