Courseiva

CKAD Practice Question: Application Environment, Configuration and Security

A developer creates a ServiceAccount 'my-sa' in namespace 'default'. They want to prevent pods from automatically mounting the ServiceAccount token. Which field should be set to false in the pod spec?

⚠ Common exam trap

CNCF often tests the distinction between pod-level and container-level fields, and the trap here is that candidates may incorrectly assume `automountServiceAccountToken` can be set under `containers` (option D) or that specifying `serviceAccountName` alone (option A) is sufficient to control token mounting.

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

✓

automountServiceAccountToken: false

Setting `automountServiceAccountToken: false` in the pod spec explicitly prevents the automatic mounting of the ServiceAccount token into the pod. This is the standard Kubernetes field for controlling token mounting at the pod level, overriding the default behavior where the token is mounted automatically.

Answer analysis

Option-by-option breakdown

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

  • ✗

    serviceAccountName: my-sa

    Why it's wrong here

    Setting serviceAccountName merely selects which ServiceAccount the pod uses; it does not control token mounting. The field that disables automatic token projection is automountServiceAccountToken, set at pod spec or ServiceAccount level. Naming the account is required whenever a pod must run as a specific identity rather than default.

  • ✓

    automountServiceAccountToken: false

    Why this is correct

    Setting `automountServiceAccountToken: false` in the pod spec stops the kubelet projecting the ServiceAccount token into the container's filesystem, satisfying the requirement to prevent automatic mounting. This field overrides the ServiceAccount's own setting, giving per-pod control without altering the `my-sa` object itself.

  • ✗

    serviceAccountName: my-sa automountServiceAccountToken: false

    Why it's wrong here

    While both fields can be specified at the pod spec level, the question asks which field should be set to false. Option C includes both, but setting serviceAccountName is not required to prevent token mounting. The correct field is automountServiceAccountToken alone.

  • ✗

    containers: - automountServiceAccountToken: false

    Why it's wrong here

    automountServiceAccountToken belongs at the pod spec level, not nested inside a container entry; Kubernetes rejects that placement. The temptation is understandable because volume mounts and securityContext are container-scoped, but token automounting is configured on the pod (or ServiceAccount), applying to all containers.

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.