Courseiva
Application Deployment →hardMultiple Choice

CKAD Application Deployment Practice Question

Which of the following is a correct Kustomize kustomization.yaml configuration for setting an image tag to 'v2'?

⚠ Common exam trap

The CKAD exam often tests the distinction between `newName` and `newTag` in Kustomize, trapping candidates who confuse the two or assume `newName` can set a tag, or who overcomplicate the solution with JSON patches when a simpler built-in field exists.

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

✓

images: - name: my-app newTag: v2

In Kustomize, the `images` field in `kustomization.yaml` uses the `newTag` key to override the tag of an existing container image. This allows you to change the image tag to 'v2' without modifying the original YAML manifests, aligning with Kustomize's declarative patching approach.

Answer analysis

Option-by-option breakdown

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

  • ✗

    images: - name: my-app newName: v2

    Why it's wrong here

    The `images` key in Kustomize accepts `newName` to replace the image repository/name, not the tag. Setting `newName: v2` changes the image name to literally 'v2', leaving the tag unchanged or defaulting it, so the deployment will not run the v2 tag. To set a tag, use `newTag` instead.

  • ✓

    images: - name: my-app newTag: v2

    Why this is correct

    The `images` field with `newTag` is the purpose-built transformer for overriding container image tags in Kustomize. It preserves the original image name and replaces only the tag with the specified value, making it the simplest and most declarative way to pin a new version across all matching containers. This is why this option is the correct answer.

  • ✗

    patches: - target: kind: Deployment patch: |- - op: replace path: /spec/template/spec/containers/0/image value: my-app:v2

    Why it's wrong here

    Although a JSON Patch via `patches` can replace the image string, it is not the correct idiomatic Kustomize configuration for this simple tag update. This patch hard-codes the full image reference and the container index, making it brittle if the container order or name changes, and it bypasses Kustomize's structured `images` transformer which can apply globally and handle digest and tag updates consistently. The question asks for a correct kustomization configuration, and the `images` field is the standard, less error-prone approach.

  • ✗

    imageTag: - name: my-app tag: v2

    Why it's wrong here

    Kustomize does not define an `imageTag` directive; the key is `images` (a list) with `newTag` for tag overrides. Using `imageTag` will cause kustomize to error out or ignore the entry because it is not a recognized field, so this is not a valid kustomization. The correct structure is `images: - name: my-app newTag: v2`.

About these practice questions

Courseiva writes every CKAD question from scratch — 826 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.