Courseiva
Application Environment, Configuration and SecuritymediumMultiple SelectObjective-mapped

CKAD ConfigMap volume mount Practice Question

Which TWO of the following are valid ways to consume a ConfigMap in a pod? (Select 2)

⚠ Common exam trap

Candidates often confuse configMapRef (used in envFrom, which is a valid method) with configMapKeyRef (used in env.valueFrom). They may also mistakenly believe that envFrom is not a valid method for ConfigMaps.

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

Mounting the ConfigMap as a volume

Although the question instructs to select two, all three options A, B, and E are actually valid ways to consume a ConfigMap in a pod. Option A is correct because a ConfigMap can be mounted as a volume, making each key a file in the container's filesystem. Option B is correct because `configMapKeyRef` in `env.valueFrom` allows loading a specific key from a ConfigMap as an environment variable. Option E is correct because `envFrom` with `configMapRef` loads all keys from a ConfigMap as environment variables. Options C and D are incorrect: `configMapRef` in `env.valueFrom` is not a valid construct (the correct syntax is `configMapKeyRef`), and `secretKeyRef` is used for Secrets, not ConfigMaps.

Answer analysis

Option-by-option breakdown

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

  • Mounting the ConfigMap as a volume

    Why this is correct

    Correct. Mounting a ConfigMap as a volume makes its data available as files.

  • Using configMapKeyRef in env.valueFrom

    Why this is correct

    Correct. Using `configMapKeyRef` in `env.valueFrom` injects a specific key as an environment variable.

  • Using configMapRef in env.valueFrom

    Why it's wrong here

    Incorrect. `configMapRef` is not used in `env.valueFrom`; the correct field is `configMapKeyRef`.

  • Using secretKeyRef in env.valueFrom

    Why it's wrong here

    Incorrect. `secretKeyRef` is used for Secrets, not ConfigMaps.

  • Using envFrom with configMapRef

    Why this is correct

    Correct: Using envFrom with configMapRef is a valid way to inject all keys from a ConfigMap as environment variables.

About these practice questions

This CKAD question is part of Courseiva's 160-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.