Back to questionsAfter
JuniorTheoryCommon
After api-config is edited, when does the running Pod api see the change in env and in /etc/api?
containers:
- name: api
image: shop/api:2.4.1
envFrom:
- configMapRef: { name: api-config }
volumeMounts:
- { name: config, mountPath: /etc/api }
volumes:
- name: config
configMap: { name: api-config }Files in /etc/api update by themselves within a minute or two; env vars keep old values until the container restarts
- Expecting env vars from a ConfigMap to change in a running container
- Expecting a file mounted with
subPathto update like a whole mounted ConfigMap
- How do you make a Deployment's Pods pick up a changed ConfigMap in their env vars?
- Why must the app re-read a mounted config file to use the new value?