Bird
0
0

You want to create a ConfigMap named app-config with literals env=prod, debug=false, and timeout=30. Which command correctly does this in one line?

hard📝 Workflow Q8 of 15
Kubernetes - ConfigMaps
You want to create a ConfigMap named app-config with literals env=prod, debug=false, and timeout=30. Which command correctly does this in one line?
Akubectl create configmap app-config --from-literal env=prod debug=false timeout=30
Bkubectl create configmap app-config --from-literal=env=prod --from-literal=debug=false --from-literal=timeout=30
Ckubectl create configmap app-config --from-literal=env=prod,debug=false,timeout=30
Dkubectl create configmap app-config --from-literal env prod --from-literal debug false --from-literal timeout 30
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct syntax for multiple literals

    Each literal must be preceded by its own --from-literal=key=value flag.
  2. Step 2: Evaluate options

    kubectl create configmap app-config --from-literal=env=prod --from-literal=debug=false --from-literal=timeout=30 correctly uses three separate --from-literal flags with equal signs.
  3. Final Answer:

    kubectl create configmap app-config --from-literal=env=prod --from-literal=debug=false --from-literal=timeout=30 -> Option B
  4. Quick Check:

    Multiple literals need separate --from-literal=key=value flags [OK]
Quick Trick: Use one --from-literal=key=value per pair, no spaces [OK]
Common Mistakes:
  • Combining literals with commas or spaces after one flag
  • Missing equal signs
  • Using spaces instead of equal signs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes