← All CKA Flashcard Decks

ConfigMaps and Secrets Flashcards

7 cards from real CKA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 ConfigMaps and Secrets flashcards as text
  1. Which kubectl command creates a ConfigMap named 'app-config' with a literal key-value pair 'ENV=production'?

    Answer: kubectl create configmap app-config --from-literal=ENV=production

    The --from-literal flag is the correct way to pass key=value pairs directly on the command line when creating a ConfigMap.

  2. How do you expose all key-value pairs from a ConfigMap named 'app-config' as environment variables in a Pod?

    Answer: Use envFrom with configMapRef specifying the ConfigMap name

    The envFrom field with configMapRef injects all ConfigMap keys as environment variables at once, without listing them individually.

  3. A ConfigMap is mounted as a volume in a Pod. After the ConfigMap is updated, what happens to the files inside the running Pod?

    Answer: The files are eventually updated automatically by the kubelet

    When a ConfigMap is mounted as a volume, the kubelet periodically syncs the projected files, so changes propagate eventually without a Pod restart.

  4. Which kubectl command creates a ConfigMap from all files in a directory named 'configs/'?

    Answer: kubectl create configmap my-config --from-file=configs/

    The --from-file flag accepts either a single file path or a directory path; when given a directory, it creates one key per file.

  5. What is the maximum data size allowed in a single Kubernetes ConfigMap?

    Answer: 1 MiB

    Kubernetes enforces a 1 MiB (1,048,576 byte) limit on ConfigMap data to avoid overwhelming the etcd storage backend.

  6. How do you reference a single key 'DB_HOST' from a ConfigMap named 'db-config' as an environment variable in a container?

    Answer: Use env with valueFrom.configMapKeyRef specifying the ConfigMap name and key

    To inject a specific key from a ConfigMap as an env var, use the env field with valueFrom.configMapKeyRef referencing the name and key.

  7. What field do you set on a ConfigMap to prevent any future modifications to its data?

    Answer: immutable: true

    Setting immutable: true on a ConfigMap prevents any updates to its data or binaryData fields, which also improves performance by eliminating watch overhead.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. training.linuxfoundation.org — Test delivery, eligibility, fees, time limit, exam information · verified Nov 2026
  2. docs.linuxfoundation.org — Passing score, renewal, score release, score validity, test dates · verified Oct 2026