Bird
0
0

You have a deployment using an immutable ConfigMap named app-config-v1. You need to update configuration safely without downtime. What is the best approach?

hard📝 Best Practice Q15 of 15
Kubernetes - ConfigMaps
You have a deployment using an immutable ConfigMap named app-config-v1. You need to update configuration safely without downtime. What is the best approach?
ACreate <code>app-config-v2</code> ConfigMap with new data, update deployment to use it, then rollout pods gradually
BUpdate <code>app-config-v1</code> directly and restart pods immediately
CDelete <code>app-config-v1</code> and create a new ConfigMap with the same name and updated data
DPatch the deployment to ignore ConfigMap changes and keep using old config
Step-by-Step Solution
Solution:
  1. Step 1: Recognize immutable ConfigMap update constraints

    Direct updates to app-config-v1 are not possible due to immutability, so options B and C are invalid.
  2. Step 2: Apply best practice for zero downtime updates

    Create a new ConfigMap app-config-v2 with updated data, update the deployment to use it, and rollout pods gradually to avoid downtime.
  3. Final Answer:

    Create app-config-v2 ConfigMap, update deployment, rollout gradually -> Option A
  4. Quick Check:

    Immutable update = new ConfigMap + gradual rollout [OK]
Quick Trick: Use new ConfigMap and gradual rollout for zero downtime [OK]
Common Mistakes:
  • Trying to update immutable ConfigMap directly
  • Deleting ConfigMap without updating deployment
  • Ignoring config changes in deployment

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes