CKAD Practice Question: Application Environment, Configuration and Security
Which field in a Pod spec specifies which ServiceAccount the pod should use?
⚠ Common exam trap
Watch out — candidates often confuse the deprecated `spec.serviceAccount` field with the correct `spec.serviceAccountName`, or mistakenly think `spec.automountServiceAccountToken` selects the ServiceAccount, when it only controls 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
✓
spec.serviceAccountName
The correct field is `spec.serviceAccountName` in the Pod spec. This field explicitly specifies the name of the ServiceAccount that the Pod should use. If omitted, the Pod automatically uses the `default` ServiceAccount in its namespace. This is defined in the Kubernetes API for PodSpec.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
spec.serviceAccount
Why it's wrong here
The field spec.serviceAccount is a deprecated legacy alias for spec.serviceAccountName from early Kubernetes API versions. Although it may still be accepted in some clients for backward compatibility, it is no longer the canonical field name, and current API tooling and documentation consistently use serviceAccountName. Choosing it as the answer would conflict with the modern PodSpec schema.
- ✗
spec.accountName
Why it's wrong here
There is no field called spec.accountName in the Kubernetes PodSpec schema. If you attempted to submit a Pod manifest with this field, the API server would reject it as an unknown field, because PodSpec only recognizes serviceAccountName for selecting the identity associated with the Pod. This option is simply a fabricated name and cannot work.
- ✗
spec.automountServiceAccountToken
Why it's wrong here
spec.automountServiceAccountToken is a boolean that only controls whether the API token associated with the Pod's service account is automatically mounted as a volume into containers. It does not select which service account the Pod runs under; that selection is always made by spec.serviceAccountName. Setting this field leaves the identity itself unchanged, so it cannot be the answer to the question.
- ✓
spec.serviceAccountName
Why this is correct
spec.serviceAccountName is the exact field used to specify which ServiceAccount should be attached to a Pod. This string field must reference a ServiceAccount that exists in the same namespace as the Pod, and if omitted, it defaults to 'default'. It is the basis for the Pod's identity for RBAC authorization and for authentication when contacting the Kubernetes API.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CKAD question from scratch — 826 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 →
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.