CompTIA Linux+ XK0-006 (V8) Practice Question

A Linux administrator is writing a Deployment manifest for the company's internal CRM application. The container image reads the database user name and password from the environment variables DB_USER and DB_PASS. Security policy states that these credentials must not appear in plaintext in the YAML file and must not be written to persistent storage on any node. Which Kubernetes-native solution meets the requirement while still injecting the variables into every pod at startup?

  • Add the DB_USER and DB_PASS values directly under the env: section of the Deployment YAML.

  • Mount a read-only hostPath volume from /etc/secure on every node and read the credentials from that directory.

  • Store the credentials in a Secret object and reference that Secret with an envFrom section in the Pod template.

  • Create a ConfigMap that contains the credentials and mount it as a volume at /etc/creds inside each container.

CompTIA Linux+ XK0-006 (V8)
Automation, Orchestration, and Scripting
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot