KCNA Kubernetes Fundamentals Practice Question
Which Kubernetes object can be used to store sensitive data, such as passwords or API keys, and inject them into pods?
⚠ Common exam trap
The trap is that candidates might think ConfigMap is appropriate for secrets because it also injects data into pods, but ConfigMap stores data in plaintext (base64 is encoding, not encryption) and is intended for non-sensitive configuration. Additionally, Secrets are not encrypted by default unless etcd encryption or KMS is configured, so they are not inherently secure.
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
✓
Secret
A Secret is the dedicated Kubernetes object for storing sensitive data like passwords, API keys, and tokens. Secrets store data as base64-encoded strings and can be injected into pods as environment variables or mounted as volumes, with optional encryption at rest via etcd or KMS.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
PersistentVolume
Why it's wrong here
PersistentVolumes provide cluster storage backed by networked filesystems or block devices; they hold files, not key-value secrets injected into pods. It is tempting because volumes can mount data into containers, and would be correct where the requirement is durable storage that outlives individual pods.
- ✗
ServiceAccount
Why it's wrong here
ServiceAccounts supply an identity for pods to authenticate to the Kubernetes API, not arbitrary application secrets. It is tempting because ServiceAccounts involve tokens mounted into pods, and would be correct where the requirement is granting a workload API permissions through RBAC.
- ✓
Secret
Why this is correct
Secrets store sensitive values such as passwords and API keys as base64-encoded data, kept separate from the image. They can be mounted as volumes or exposed as environment variables, satisfying the requirement to inject credentials into pods without embedding them in the container.
- ✗
ConfigMap
Why it's wrong here
ConfigMaps hold non-confidential configuration data in plaintext, so storing passwords or API keys there exposes them. It is tempting because ConfigMaps inject key-value data into pods via environment variables or volumes, and would be correct where the requirement is non-sensitive application configuration rather than secrets.
Go deeper
Related to this question
About these practice questions
This KCNA question is part of Courseiva's 930-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.