Courseiva
Kubernetes Fundamentals →hardMultiple Choice

KCNA Kubernetes Fundamentals Practice Question

An application requires that configuration data be mounted as a file inside the container. The data may change at runtime, and the application should automatically read the updated values without restarting. Which approach should be used?

⚠ Common exam trap

A common trap is the misconception that subPath mounts support live updates, when in fact they create a static file binding that prevents automatic propagation of ConfigMap changes.

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

✓

Use a ConfigMap mounted as a volume without subPath

Mounting a ConfigMap as a volume (without subPath) creates a symlink-based mount that automatically updates when the ConfigMap changes. The kubelet periodically syncs the ConfigMap data and updates the symlinks, allowing the application to read the new values without a restart. This satisfies the requirement for runtime configuration updates without container restart.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Store the configuration in a Secret and mount it using subPath

    Why it's wrong here

    Mounting a Secret with subPath copies the value at container start; kubelet does not refresh subPath mounts, so runtime changes never reach the file. Secrets suit sensitive data, and subPath suits single-file injection, but the projected-volume approach without subPath is what propagates updates.

  • ✓

    Use a ConfigMap mounted as a volume without subPath

    Why this is correct

    A ConfigMap mounted as a volume without subPath is updated in place when the ConfigMap changes, and kubelet syncs the projected files periodically. The application reads the mounted file and picks up new values without a restart, meeting the runtime-update constraint.

  • ✗

    Use a PersistentVolumeClaim to store the configuration

    Why it's wrong here

    A PersistentVolumeClaim provides durable block or file storage, not configuration distribution; it is not automatically updated when a ConfigMap changes. It is tempting because it mounts as a filesystem path, but PVCs suit persistent application data, whereas ConfigMap volumes are the mechanism for live configuration refresh.

  • ✗

    Store the configuration in an environment variable from a ConfigMap

    Why it's wrong here

    Environment variables are injected once at container creation and never updated while the container runs, so runtime changes require a restart. They are tempting because ConfigMaps commonly feed environment variables, but only a ConfigMap mounted as a volume gets periodically refreshed by kubelet.

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 by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.