Courseiva
Cloud Native Application DeliveryeasyMultiple ChoiceObjective-mapped

KCNA Cloud Native Application Delivery Practice Question

A team is deploying a new microservice that processes sensitive user data. They want to ensure that secrets such as database passwords are not exposed in the container image or environment variables. Which approach should they use?

⚠ Common exam trap

CNCF often tests the misconception that ConfigMaps are suitable for secrets because they can store key-value pairs, but the trap is that ConfigMaps store data in plaintext and are not designed for sensitive information, whereas Secrets provide base64 encoding and optional encryption at rest.

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

Store the secret in a Kubernetes Secret and mount it as a volume in the pod

Kubernetes Secrets are designed specifically to store sensitive data like database passwords. Mounting the Secret as a volume ensures the secret data is available to the pod as files, without being exposed in environment variables (which can be leaked via logs or `kubectl describe`) or embedded in the container image. This approach follows security best practices for handling sensitive information in cloud-native applications.

Answer analysis

Option-by-option breakdown

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

  • Embed the secret directly in the Docker image and use it via environment variables

    Why it's wrong here

    Embedding secrets in images is insecure and violates best practices.

  • Store the secret in a ConfigMap and reference it in the pod spec

    Why it's wrong here

    ConfigMaps are not designed for secrets and are not encrypted.

  • Store the secret in a Kubernetes Secret and mount it as a volume in the pod

    Why this is correct

    Secrets are designed for sensitive data; volume mounts reduce exposure.

  • Use a PersistentVolumeClaim to store the secret and mount it into the pod

    Why it's wrong here

    PVCs are for storage, not for secrets; this is not a standard pattern.

About these practice questions

This KCNA question is part of Courseiva's 833-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 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.