Courseiva
Application Deployment →hardMultiple Choice

CKAD Application Deployment Practice Question

You are using Kustomize with a base and an overlay. The base sets a Deployment's replicas to 3. The overlay sets replicas to 5 using a patch. What is the final replica count after running 'kubectl apply -k overlay/'?

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

✓

5

In Kustomize, overlays override base values through patches. The overlay specifies replicas: 5, so the final replica count is 5. Thus, option A is correct. Option B is incorrect because Kustomize applies patches in a defined order, not a random merge. Option C is incorrect because values are not summed. Option D is the base value, which is overridden.

Answer analysis

Option-by-option breakdown

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

  • ✓

    5

    Why this is correct

    Kustomize's overlay patches are applied on top of the base after the base is fully rendered. A patch that sets replicas to 5 will replace the base's value of 3, because overlays are designed to be the final authority for customized values. The kustomize build output therefore contains the patched field, not the base's original value, making 5 the correct and deterministic result.

  • ✗

    The result depends on the merge order

    Why it's wrong here

    Kustomize does not perform a general-purpose merge where order between base and overlay is ambiguous; the overlay is always layered after the base in a fixed, deterministic sequence. Built-in patch precedence and strategic merge semantics guarantee that overlay patches override base fields regardless of any external ordering. Thus the answer is not contingent on merge order, but on the defined overlay-over-base hierarchy.

  • ✗

    8

    Why it's wrong here

    The value 8 would imply that the overlay adds to the base's replica count, but Kustomize patches are declarative replacements, not arithmetic accumulators. A patch specifying replicas: 5 overwrites the base's 3; there is no addition, summation, or combination of numeric values. Since no other patch modifies replicas, the result cannot exceed the explicitly patched value of 5.

  • ✗

    3

    Why it's wrong here

    The value 3 is the base's original setting before any overlay is applied, but the overlay patch explicitly targets the Deployment's replicas field and overrides it. In kustomize, the base provides defaults, while the overlay is meant to customize those values for a specific environment; ignoring the overlay would defeat its purpose. Therefore the final output must reflect the overlay's 5, not the base's 3.

About these practice questions

This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.