KCNA Kubernetes Fundamentals Practice Question
Which THREE are valid ways to provide configuration data to a pod in Kubernetes?
⚠ Common exam trap
The KCNA exam often tests the misconception that any method of injecting data into a pod is a 'valid' configuration approach, but the KCNA exam expects you to recognize that only native Kubernetes API objects (ConfigMaps and Secrets) are the recommended and valid ways to provide configuration data, rejecting ad-hoc methods like init container scripts or hardcoded values.
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
✓
Mount a ConfigMap as a volume
A ConfigMap is a Kubernetes API object designed to store non-confidential configuration data in key-value pairs. Mounting a ConfigMap as a volume makes its data available as files in the pod's filesystem, allowing applications to read configuration without hardcoding it into the container image or pod spec. This approach decouples configuration from containerized applications, following the principle of immutable infrastructure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use an init container to write configuration to a shared volume
Why it's wrong here
While possible, it is not a direct method; it's a workaround.
- ✓
Mount a ConfigMap as a volume
Why this is correct
ConfigMaps can be mounted as files in a pod.
- ✓
Mount a Secret as a volume
Why this is correct
Secrets can be mounted as files for secure access.
- ✗
Hardcode environment variables in the pod spec that contain sensitive data
Why it's wrong here
Sensitive data should be stored in Secrets, not hardcoded.
- ✓
Use environment variables from a ConfigMap
Why this is correct
ConfigMap data can be injected as environment variables.
Go deeper
Related to this question
About these practice questions
This KCNA question is part of Courseiva's 833-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This KCNA 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 KCNA exam.