Bird
0
0

You have two configuration files, frontend.conf and backend.conf. Which command will create a ConfigMap named full-config containing both files as separate keys?

hard📝 Workflow Q8 of 15
Kubernetes - ConfigMaps
You have two configuration files, frontend.conf and backend.conf. Which command will create a ConfigMap named full-config containing both files as separate keys?
Akubectl create configmap full-config --from-file=frontend.conf --from-file=backend.conf
Bkubectl create configmap full-config --from-file=frontend.conf,backend.conf
Ckubectl create configmap full-config --from-file=./frontend.conf backend.conf
Dkubectl create configmap full-config --from-file=frontend.conf backend.conf
Step-by-Step Solution
Solution:
  1. Step 1: Understand multiple file inclusion

    To include multiple files, use multiple --from-file flags, one per file.
  2. Step 2: Evaluate options

    kubectl create configmap full-config --from-file=frontend.conf --from-file=backend.conf correctly uses two --from-file flags. kubectl create configmap full-config --from-file=frontend.conf,backend.conf incorrectly uses a comma-separated list. Options C and D have syntax errors or missing flags.
  3. Final Answer:

    kubectl create configmap full-config --from-file=frontend.conf --from-file=backend.conf -> Option A
  4. Quick Check:

    Use separate --from-file flags for each file [OK]
Quick Trick: Use multiple --from-file flags for multiple files [OK]
Common Mistakes:
  • Using commas to separate files in one flag
  • Omitting --from-file for second file
  • Incorrect command syntax for multiple files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes