Courseiva
Kubernetes Fundamentals →mediumMultiple Choice

KCNA Kubernetes Fundamentals Practice Question

You need to provide configuration data as environment variables to a pod, but the data is not sensitive. Which object should you use?

⚠ Common exam trap

Many candidates confuse ConfigMap with Secret, assuming that any data passed as environment variables must be sensitive, or they overlook that ServiceAccounts are for identity, not configuration data.

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

✓

ConfigMap

A ConfigMap is the correct Kubernetes object for providing non-sensitive configuration data as environment variables to a pod. ConfigMaps are designed to decouple configuration artifacts from image content to keep containers portable, and they support injection via environment variables, command-line arguments, or volume mounts. Unlike Secrets, ConfigMaps store data in plaintext (base64-encoded only for transport) and are intended for data that does not require encryption at rest or in transit.

Answer analysis

Option-by-option breakdown

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

  • ✓

    ConfigMap

    Why this is correct

    ConfigMap stores non-sensitive configuration as key–value pairs, which Kubernetes can project into a pod as environment variables via `envFrom` or `valueFrom.configMapKeyRef`. This satisfies the stem's constraint that the data is not sensitive, unlike Secret, which is intended for credentials and base64-encodes values.

  • ✗

    Secret

    Why it's wrong here

    A Secret injects environment variables, but it is intended for sensitive values such as passwords and tokens, and the stem states the data is not sensitive. It is tempting because the mechanism matches exactly, and would be correct if the configuration contained credentials requiring protection.

  • ✗

    ServiceAccount

    Why it's wrong here

    A ServiceAccount provides an identity for pods to authenticate to the Kubernetes API, not arbitrary configuration values. It is tempting because it is mounted into pods and referenced in specs, and would be correct when a workload needs RBAC-scoped API permissions rather than configuration data.

  • ✗

    PersistentVolume

    Why it's wrong here

    A PersistentVolume supplies durable block or file storage to a pod, and cannot inject key-value pairs as environment variables. It is tempting because pods do mount volumes for data, and would be correct when the requirement is retaining files across pod restarts rather than passing configuration.

About these practice questions

One of 930 original KCNA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.