Wire a ConfigMap and roll it safely
- 12 min
- 6 steps
- Config, storage and state
Steps
0 of 6 done
Unstick a Deployment waiting on its ConfigMap, then ship a configuration change as an immutable, versioned ConfigMap and a rollout.
Step 1 of 6
The two
storefrontpods have sat inContainerCreatingsince the Deployment was applied. Find the event that says what they are waiting for.Checked against what your commands print.
Step 2, not started: Create the ConfigMap the pods expect:
storefront-config, with the fileconfig.yamlfrom your working directory under the keyconfig.yaml, and a keyLOG_LEVELset toinfo. Wait until both pods are ready.Step 3, not started: From inside a running
storefrontpod, print the value ofLOG_LEVELthe container received.Step 4, not started: Ship
LOG_LEVEL=debugwithout touchingstorefront-config. Createstorefront-config-v2with the sameconfig.yamlandLOG_LEVELset todebug, and make it immutable.Step 5, not started: Point the Deployment at
storefront-config-v2, both theLOG_LEVELreference and theconfigvolume, and let the rollout finish.Step 6, not started: A rollback returns to an earlier revision's pod template. Print the pod template of revision 1 and find the ConfigMap it references, the configuration
kubectl rollout undowould bring back.
Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.