CKAD Practice Question: Application Environment, Configuration and Security
A pod uses a ServiceAccount with automountServiceAccountToken set to false. The pod still needs to access the Kubernetes API. How can you mount the service account token in this pod?
⚠ Common exam trap
It's easy for candidates to think they need to manually create a Secret or ConfigMap to inject the token, when in fact the pod spec override of `automountServiceAccountToken` is the correct and simplest approach.
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
✓
Set automountServiceAccountToken: true in the pod spec
Setting `automountServiceAccountToken: true` in the pod spec overrides the ServiceAccount-level setting of `false`. This allows the pod to mount the service account token automatically, enabling it to authenticate to the Kubernetes API without manual intervention.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Set automountServiceAccountToken: true in the pod spec
Why this is correct
Setting automountServiceAccountToken: true directly in the pod spec is the correct, explicit override when the referenced ServiceAccount has automount disabled. This field takes precedence over the ServiceAccount's setting, causing the kubelet to project the service account token into the pod at /var/run/secrets/kubernetes.io/serviceaccount/token. That mounted token lets in-cluster clients authenticate to the Kubernetes API server without any extra steps.
- ✗
Create a secret with the token and mount it manually
Why it's wrong here
While you could extract the token from the ServiceAccount and manually create a Secret to mount, this is non-standard and unnecessary. The service account mechanism already mounts a projected, short-lived token via the pod's service account, and manually created Secrets bypass automatic rotation and audience binding, increasing security risk. Tokens are also automatically provided, so hand-crafting a Secret adds no benefit and duplicates credentials.
- ✗
Use a ConfigMap to store the token
Why it's wrong here
Storing a service account token in a ConfigMap is inappropriate because ConfigMaps are meant for non-sensitive configuration data and are stored in plaintext, including in etcd. Tokens act as bearer credentials; placing them in a ConfigMap exposes them to any consumer with list/get access on ConfigMaps and violates Kubernetes security best practices. The token should be mounted automatically via the service account mechanism, not placed in a ConfigMap.
- ✗
Set serviceAccountName: default and automountServiceAccountToken: true in the pod spec
Why it's wrong here
Including serviceAccountName: default is redundant because default is already the active ServiceAccount when none is specified, and that field alone does not enable token mounting. The decisive setting is automountServiceAccountToken: true at the pod level, which overrides the ServiceAccount's own automount setting. Adding default adds nothing and obscures the real fix, which is to explicitly toggle the pod-level automount field.
Go deeper
Related to this question
About these practice questions
One of 826 original CKAD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.