Courseiva
Cloud Native Architecture →mediumMultiple Choice

KCNA Cloud Native Architecture Practice Question

Which of the following best describes 'Infrastructure as Code' (IaC)?

⚠ Common exam trap

KCNA often tests the distinction between declarative (desired-state) and imperative (step-by-step) approaches, so candidates who equate 'automation' or 'scripting' with IaC pick Option B.

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

✓

Defining infrastructure resources in a declarative configuration file

IaC is fundamentally about declaring the desired end state of infrastructure in machine-readable configuration files (Terraform HCL, CloudFormation YAML, Kubernetes manifests) and letting a tool reconcile reality to match that declaration. Option D captures this declarative model, which is the defining characteristic of modern IaC. The key distinction is that the file describes *what* the infrastructure should look like, not the step-by-step *how*.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Manually configuring servers via SSH

    Why it's wrong here

    Manual SSH configuration is imperative, human-executed change with no version-controlled definitions or repeatable provisioning, which is the opposite of IaC. It is tempting because it is how many administrators first build servers, and would be correct only for one-off troubleshooting, not for reproducible infrastructure.

  • ✗

    Using a scripting language to automate tasks

    Why it's wrong here

    Scripting automates task execution but does not declare desired end-state infrastructure in versioned definition files, so it lacks IaC's idempotent provisioning model. It is tempting because automation and IaC are often conflated, and scripting would be correct for ad-hoc operational tasks rather than provisioning whole environments.

  • ✗

    Running containers on a Kubernetes cluster

    Why it's wrong here

    Running containers on Kubernetes describes workload orchestration, not declaring infrastructure in version-controlled definition files. It is tempting because Kubernetes manifests are declarative YAML, and Kubernetes would be the correct answer for scheduling and scaling containerised applications, not for defining IaC itself.

  • ✓

    Defining infrastructure resources in a declarative configuration file

    Why this is correct

    Declarative configuration files let you specify the desired end state of infrastructure, and the tool reconciles actual resources to match it. This satisfies IaC's core constraint: infrastructure defined reproducibly in version-controlled code rather than manual provisioning, enabling consistent, repeatable deployments across environments without imperative step-by-step commands.

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 →

How Courseiva writes practice questions · Editorial policy

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.