Pod API Authentication Token Methods
Which TWO of the following are valid methods to provide a token to a Pod for authenticating to the Kubernetes API server?
Quick Answer
The answer is mounting a ServiceAccount token into the pod automatically and using a projected volume with a ServiceAccountToken projection. The first method is the default behavior in Kubernetes: when a pod is created without explicit service account settings, the API server automatically mounts a long-lived, non-expiring token from the pod’s associated ServiceAccount into the container at /var/run/secrets/kubernetes.io/serviceaccount. The second method, a projected volume, is the modern, recommended approach because it leverages the TokenRequest API to generate a time-bound, audience-scoped token, giving you explicit control over the token’s audience, expiration, and mount path. On the CKA exam, this distinction is a common trap—many candidates mistakenly think only the automatic mount is valid, but the exam tests your understanding of both legacy and best-practice methods for pod API authentication. Remember: automatic mount is the old default, projected volume is the secure, customizable upgrade.
⚠ Common exam trap
It's easy for candidates to think storing a token in a Secret and mounting it (Option C) is a valid authentication method, but the CKA tests whether you know that the correct approach is to use the TokenRequest API via a projected volume or rely on the automatic ServiceAccount token mount, not to manually create and mount Secret-based tokens.
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
✓
Using a projected volume with a ServiceAccountToken projection
A projected volume with a ServiceAccountToken projection allows you to explicitly control the token's audience, expiration, and path, and it requests a time-bound, audience-scoped token from the TokenRequest API. This is the recommended method for pods that need to authenticate to the Kubernetes API server with custom token properties.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Using a ConfigMap to store the token and mounting it
Why it's wrong here
ConfigMaps are not for secrets and should not store tokens.
- ✓
Using a projected volume with a ServiceAccountToken projection
Why this is correct
You can use a projected volume to inject a token with a specific audience and expiration.
- ✗
Storing a token in a Secret and mounting it as a volume
Why it's wrong here
Secrets can store tokens, but they are not automatically mounted; they must be explicitly referenced in the pod spec.
- ✓
Mounting a ServiceAccount token into the pod automatically
Why this is correct
Each pod gets a service account token automatically mounted at /var/run/secrets/kubernetes.io/serviceaccount/token.
- ✗
Setting the token as an environment variable using the downward API
Why it's wrong here
The downward API does not expose the service account token; it is not available as a field.
Go deeper
Related to this question
Learn chapter
Kubernetes Architecture Overview
Key term
Network Policies
A Kubernetes resource that controls how pods communicate with each other and with other network endpoints, acting as a firewall for pod-to-pod traffic.
Key term
Ingress Resources
Ingress Resources are Kubernetes API objects that manage external access to services inside a cluster, typically HTTP and HTTPS traffic, by defining rules for routing requests based on hostnames and paths.
About these practice questions
Courseiva writes every CKA question from scratch — 302 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 →
Same concept, more angles
1 more way this is tested on CKA
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Which THREE are valid methods to provide authentication to the Kubernetes API server? (Select three.)
hard- A.Username and password
- ✓ B.Client certificates
- ✓ C.ServiceAccount bearer tokens
- ✓ D.Static token file
- E.SSH keys
Why B: Client certificates are a valid authentication method for the Kubernetes API server. The API server can be configured with the `--client-ca-file` flag to trust a Certificate Authority (CA), and then clients present a TLS certificate signed by that CA to authenticate. This is a common and secure method for user and component authentication.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKA 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 CKA exam.