Bird
0
0

If a pod references a ConfigMap as environment variables, what is the effect of updating the ConfigMap without restarting the pod?

easy📝 Conceptual Q1 of 15
Kubernetes - ConfigMaps
If a pod references a ConfigMap as environment variables, what is the effect of updating the ConfigMap without restarting the pod?
AThe pod continues using the old environment variable values until restarted
BThe pod automatically reloads the new environment variables immediately
CThe pod crashes and restarts to apply the new ConfigMap values
DThe pod updates environment variables only after a manual config reload command
Step-by-Step Solution
Solution:
  1. Step 1: Understand environment variable injection

    Environment variables from ConfigMaps are injected at pod start time.
  2. Step 2: Effect of ConfigMap update

    Updating the ConfigMap does not affect running pods' environment variables until they restart.
  3. Final Answer:

    The pod continues using the old environment variable values until restarted -> Option A
  4. Quick Check:

    Env vars are static per pod lifecycle [OK]
Quick Trick: Env vars from ConfigMaps update only after pod restart [OK]
Common Mistakes:
  • Assuming pods auto-update env vars without restart
  • Believing pods crash automatically on ConfigMap change

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes