Courseiva

CKAD Practice Question: Application Environment, Configuration and Security

A pod needs to mount a Secret named 'db-secret' as a volume at /etc/secret. Which volume mount definition is correct?

⚠ Common exam trap

Watch out — candidates often confuse the `secret` volume source with the `configMap` volume source, or incorrectly use `secretVolumeSource` (which is not a valid field) instead of the correct `secret` key, leading them to choose option B.

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

✓

volumes: - name: secret-volume secret: secretName: db-secret

It uses the proper `secret` key under the `volumes` field to reference a Secret object by its `secretName`. When this volume is mounted at `/etc/secret`, Kubernetes automatically creates a file for each key in the Secret, with the file content being the decoded value of the key. This is the standard syntax for mounting a Secret as a volume.

Answer analysis

Option-by-option breakdown

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

  • ✓

    volumes: - name: secret-volume secret: secretName: db-secret

    Why this is correct

    The pod spec's volumes stanza declares a volume named secret-volume sourced from the Secret db-secret via the secret.secretName field. A matching volumeMount referencing that volume name then projects the Secret's keys as files into the container at /etc/secret.

  • ✗

    volumes: - name: secret-volume secretVolumeSource: secretName: db-secret

    Why it's wrong here

    Kubernetes volume sources use the lowercase key 'secret', not 'secretVolumeSource'; the API server rejects this manifest, so the pod never mounts /etc/secret. It is tempting because 'secretVolumeSource' resembles the Go type name for secret volumes, and that key would be correct in a typed client or SDK struct, not in YAML.

  • ✗

    volumes: - name: db-secret secret: secretName: db-secret

    Why it's wrong here

    This defines the volume name as 'db-secret' but omits the required volumeMounts entry mapping it to /etc/secret, so nothing appears at that path. Naming a volume after the Secret is tempting because it looks self-documenting, and it would work if a matching volumeMounts block with mountPath /etc/secret were also declared.

  • ✗

    volumes: - name: secret-volume secret: name: db-secret

    Why it's wrong here

    This fragment defines the volume itself, not the volumeMount that places it at /etc/secret inside the container. A volumeMount entry with mountPath and the matching volume name is required; the volume block alone leaves the Secret unmounted.

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.