KCNA Cloud Native Architecture Practice Question
Which of the following is a core principle of the 12-factor app methodology?
⚠ Common exam trap
The trap is confusing log storage with log handling: candidates might think storing logs in the filesystem is acceptable, but 12-factor explicitly advocates treating logs as event streams, not files.
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
✓
Treat logs as event streams
The 12-factor app methodology, a set of best practices for building modern, scalable applications, includes the principle 'Treat logs as event streams.' This means an app should not concern itself with routing or storage of its output stream; instead, it writes logs to stdout/stderr, and the execution environment captures and routes them. This decouples log management from the application, enabling flexibility and scalability.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Treat logs as event streams
Why this is correct
Treating logs as event streams means the app writes them to stdout as an unbuffered sequence of events, leaving routing, storage and aggregation to the execution environment. This decouples the app from log destinations, matching the 12-factor principle of separation from backing services.
- ✗
Store configuration in the application code
Why it's wrong here
Storing configuration in code violates the 12-factor principle of separating config from code, since credentials and environment-specific values must come from environment variables to allow the same build to deploy across environments. It is tempting because hardcoding defaults suits single-environment prototypes, where no deployment variation exists.
- ✗
Store logs in the local filesystem of each container
Why it's wrong here
Storing logs in a container's local filesystem contradicts the 12-factor principle of treating logs as event streams, where the process writes unbuffered to stdout/stderr and the execution environment captures them. It is tempting because local files suit single-host debugging, but container filesystems are ephemeral, so logs vanish on restart and cannot be aggregated centrally.
- ✗
Use shared filesystems for persistent storage
Why it's wrong here
Shared filesystems tie an app to a specific host or mount, so state does not travel with the process and horizontal scaling breaks. The 12-factor principle is stateless processes with backing services for persistence. Shared storage is legitimate for legacy lift-and-shift workloads needing clustered file access, not for cloud-native twelve-factor design.
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 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.