KCNA Cloud Native Architecture Practice Question
Which of the following is a key principle of the 12-factor app methodology related to managing configuration?
⚠ Common exam trap
KCNA often tests the 12-factor 'Config' factor, catching candidates who confuse environment variables with config files or build-time embedding, missing the core principle of separating config from code for portability.
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 environment variables for configuration
The 12-factor app methodology's third factor, 'Config,' states that configuration should be stored in the environment (environment variables), not in the code. This separates config from code, allowing the same build to be deployed across environments (dev, staging, prod) without modification. Environment variables are language-agnostic and easily changed per deployment.
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 configuration in the application code
Why it's wrong here
Twelve-factor requires configuration stored in the environment, keeping credentials and per-deploy values out of the codebase so the same artefact promotes across stages. Hard-coding config in application code is tempting for simplicity, and would suit a throwaway script where no environment variation exists.
- ✓
Use environment variables for configuration
Why this is correct
Twelve-factor apps separate configuration from code, storing it in environment variables so the same build deploys unchanged across environments. This satisfies the stem's constraint of managing configuration without hardcoding values or committing environment-specific settings into the codebase.
- ✗
Embed configuration in the build process
Why it's wrong here
Baking configuration into the build produces a distinct artefact per environment, breaking the twelve-factor rule that config lives in the environment, separate from code. Build-time embedding is tempting for immutable images, and would be correct where each environment is deliberately compiled as its own release.
- ✗
Use a configuration file in the application directory
Why it's wrong here
Twelve-factor explicitly rejects config files committed in the application directory, since they tie the build to one environment and leak secrets into version control. Bundling a config file is tempting because it is self-contained, and would be correct for a single-environment desktop tool never promoted elsewhere.
Go deeper
Related to this question
About these practice questions
Courseiva writes every KCNA question from scratch — 930 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CNCF exam blueprint
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.