Courseiva

KCNA Cloud Native Application Delivery Practice Question

When using Kustomize, how do you apply a common label to all resources in the base?

⚠ Common exam trap

Test-takers frequently confuse Kustomize's `patches` field with label application; candidates often assume any modification requires a patch, when `commonLabels` is the dedicated mechanism.

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

✓

By setting 'commonLabels' in the kustomization.yaml

Kustomize's `commonLabels` field in kustomization.yaml applies the specified labels to every resource rendered from the base, including selectors on Deployments and Services, without editing individual manifests. This is the idiomatic way to enforce consistent labeling across a set of resources.

Answer analysis

Option-by-option breakdown

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

  • ✗

    By editing each YAML file individually

    Why it's wrong here

    Editing each YAML file individually duplicates the label across manifests and defeats Kustomize's declarative overlay model, so drift appears as resources are added. It is tempting for small bases, but it is correct only when a manifest is managed outside any Kustomize base.

  • ✓

    By setting 'commonLabels' in the kustomization.yaml

    Why this is correct

    Setting `commonLabels` in `kustomization.yaml` makes Kustomize inject the specified labels into every resource's metadata during the build, satisfying the requirement to label all base resources uniformly. Kustomize applies this transformation automatically across the entire base, so no per-resource edits are needed.

  • ✗

    By using the 'patches' field to add labels

    Why it's wrong here

    The patches field applies targeted JSON6902 or strategic-merge edits to named resources; it does not propagate a label across every object in the base. It is tempting because patches do modify metadata, but it is correct when overriding specific fields on identified resources.

  • ✗

    By using a Helm chart instead of Kustomize

    Why it's wrong here

    Helm replaces Kustomize entirely, so the base's kustomization.yaml labels transformer is never applied. It is tempting because Helm also supports common labels, but it is correct when packaging templated charts rather than layering overlays onto an existing Kustomize base.

About these practice questions

Courseiva writes every KCNA question from scratch — 930 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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CNCF exam blueprint

This KCNA 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 KCNA exam.