Bird
0
0

If a pod uses a ConfigMap as environment variables, what happens when the ConfigMap is updated?

medium📝 Command Output Q5 of 15
Kubernetes - ConfigMaps
If a pod uses a ConfigMap as environment variables, what happens when the ConfigMap is updated?
AThe pod crashes immediately
BThe pod's environment variables update automatically
CThe pod reloads environment variables without restart
DThe pod's environment variables remain unchanged until restart
Step-by-Step Solution
Solution:
  1. Step 1: Understand environment variable injection from ConfigMaps

    Environment variables are set at container start time.
  2. Step 2: Effect of ConfigMap update on environment variables

    Updating ConfigMap does not change environment variables in running pods until restart.
  3. Final Answer:

    The pod's environment variables remain unchanged until restart -> Option D
  4. Quick Check:

    Env vars from ConfigMap update only after pod restart [OK]
Quick Trick: Env vars from ConfigMap need pod restart to update [OK]
Common Mistakes:
  • Expecting live environment variable updates
  • Assuming pod crashes on ConfigMap change
  • Thinking pod reloads env vars automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes