Courseiva
Application Deployment →mediumMultiple Choice

CKAD Application Deployment Practice Question

A Deployment named 'web-app' has 4 replicas. You need to perform a rolling update with a maxSurge of 50% and maxUnavailable of 25%. Which YAML snippet configures this correctly?

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: 50% maxUnavailable: 25%

Ly uses the fields maxSurge and maxUnavailable with the required percentages (50% and 25%). Option A uses incorrect field names (surge, unavailable). Option C uses absolute numbers instead of percentages. Option D swaps the values (maxSurge: 25%, maxUnavailable: 50%). Therefore, option B is the correct configuration for the rolling update.

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: surge: 50% unavailable: 25%

    Why it's wrong here

    The keys `surge` and `unavailable` are not valid fields in a Deployment's `rollingUpdate` configuration. Kubernetes only recognizes `maxSurge` and `maxUnavailable`, so this manifest would either be rejected by the API server or silently ignored, leaving the default surge/unavailable settings unchanged. Because the intended 50% surge and 25% maximum unavailable are placed under nonexistent keys, the rollout would not follow the specified scaling behavior.

  • ✓

    strategy: rollingUpdate: maxSurge: 50% maxUnavailable: 25%

    Why this is correct

    This correctly sets `maxSurge: 50%` and `maxUnavailable: 25%`, which are the exact fields and values requested for managing the rolling update. With four replicas, 50% surge translates to two extra pods (rounded up), allowing up to six pods, while 25% unavailable translates to one pod down (rounded down), guaranteeing at least three pods remain available during the update. This is the valid YAML representation of a rolling update with a 50% surge and 25% maximum unavailability.

  • ✗

    strategy: rollingUpdate: maxSurge: 2 maxUnavailable: 1

    Why it's wrong here

    Although `maxSurge: 2` and `maxUnavailable: 1` are valid absolute numbers and happen to match 50% and 25% of the current 4-replica count, the requirement specifies percentage-based values. Using absolute numbers fixes the surge and unavailability regardless of replica count, so if the deployment later scales to, say, 10 replicas, the same 2-surge/1-unavailable values no longer represent the requested 50% and 25% thresholds. This does not satisfy the explicit instruction to set percentages.

  • ✗

    strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 50%

    Why it's wrong here

    This configuration swaps the two values, setting `maxSurge` to 25% (only one extra pod) and `maxUnavailable` to 50% (allowing two pods to be down). A smaller surge and a larger unavailability window force the rollout to maintain less headroom and tolerate greater downtime, degrading availability and slowing the update compared to the intended 50% surge / 25% unavailable. The reversed settings directly contradict the stated rollout policy.

About these practice questions

One of 826 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.