Courseiva

KCNA Cloud Native Architecture Practice Question

Which TWO of the following are examples of Infrastructure as Code (IaC) tools? (Choose 2.)

⚠ Common exam trap

KCNA often tests the distinction between infrastructure provisioning tools (Terraform, Pulumi) and cluster/application tooling (kubectl, Helm, Docker Compose), so candidates who conflate 'managing YAML' with 'Infrastructure as Code' pick Helm or kubectl incorrectly.

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

✓

Terraform

Terraform (A) is a declarative Infrastructure as Code tool that uses HCL configuration files and providers to provision and manage cloud and on-premises resources through a state file. Pulumi (C) is also an IaC tool, allowing infrastructure to be defined in general-purpose programming languages such as TypeScript, Python, Go, and C# and deployed via its engine. kubectl (B) is a command-line client for interacting with Kubernetes clusters, not an IaC provisioning tool. Helm (D) is a Kubernetes package manager that templates and deploys manifests, and Docker Compose (E) orchestrates multi-container Docker applications from a YAML file; both manage application deployment rather than provisioning infrastructure as code.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Terraform

    Why this is correct

    Terraform declares infrastructure in HashiCorp Configuration Language and reconciles real resources against that desired state, making it a declarative provisioning tool. This satisfies the IaC requirement, unlike configuration-management or container-orchestration tools that operate after infrastructure already exists.

  • ✗

    kubectl

    Why it's wrong here

    kubectl applies manifests to a running cluster; it does not define infrastructure declaratively as a stored, versioned artefact. It is tempting because YAML manifests look like code, but kubectl is an imperative client, whereas IaC tools such as Terraform or Ansible provision and manage resources from declarative configuration files.

  • ✓

    Pulumi

    Why this is correct

    Pulumi provisions and manages cloud infrastructure declaratively through code, letting teams define resources in general-purpose languages and apply version-controlled, repeatable deployments. That declarative, code-driven provisioning is precisely the IaC characteristic the question asks you to identify.

  • ✗

    Helm

    Why it's wrong here

    Helm packages and templates Kubernetes manifests, but it is a package manager for deploying applications, not an IaC provisioning tool. It is tempting because charts are declarative YAML, yet Helm targets release management inside an existing cluster rather than defining underlying infrastructure.

  • ✗

    Docker Compose

    Why it's wrong here

    Docker Compose orchestrates multi-container applications locally from a YAML file; it does not provision cloud or on-premises infrastructure. It is tempting because the compose file is declarative, but IaC tools such as Terraform or CloudFormation create and manage the underlying resources themselves.

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 →

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.