hardMultiple SelectObjective-mapped
CAS-004 Practice Question: A container orchestration platform uses secrets…
A container orchestration platform uses secrets management. Which two methods are recommended for injecting secrets into containers? (Choose two.)
⚠ Common exam trap
A common misconception is that environment variables are safe for injecting secrets into containers, but they are visible in container metadata, logs, and debugging tools, making them insecure compared to file-based mounts or external secret stores.
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
✓
Use Kubernetes Secrets mounted as files.
Kubernetes Secrets can be mounted as files into a container's filesystem, allowing applications to read sensitive data (e.g., passwords, tokens) from a file path rather than exposing them in environment variables or image layers. This approach keeps secrets out of the container image and reduces the risk of accidental exposure through logs or process listings.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Store secrets in environment variables in the container image.
Why it's wrong here
Secrets in images are exposed in the image layer.
- ✗
Hardcode secrets in the application source code.
Why it's wrong here
Hardcoding exposes secrets in code repositories.
- ✓
Use Kubernetes Secrets mounted as files.
Why this is correct
Mounted secrets are stored in tmpfs and not written to disk.
- ✗
Pass secrets via command-line arguments in the Dockerfile.
Why it's wrong here
Command-line arguments are visible in process listings and image history.
- ✓
Use a volume mount from a secret store like HashiCorp Vault.
Why this is correct
Volume mounts from secure stores keep secrets external to the image.
Go deeper
Related to this question
About these practice questions
This CAS-005 question is part of Courseiva's 968-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 CAS-005 practice question is part of Courseiva's free CompTIA 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 CAS-005 exam.