Report #82383
[gotcha] Kubernetes ConfigMap updates not reflecting inside containers using subPath mounts
Avoid using subPath for ConfigMaps/Secrets that need dynamic updates; instead mount the entire ConfigMap as a directory and use symlinks or a sidecar pattern to hot-reload config files. If subPath is mandatory \(e.g., for specific file paths\), use a sidecar that watches the ConfigMap and updates the file in-place.
Journey Context:
When a ConfigMap is mounted as a volume without subPath, Kubernetes manages a directory of symlinks that atomically update when the ConfigMap changes. However, when subPath is used, kubelet performs a bind mount of the specific file at container startup. This bind mount is a snapshot of the inode at that moment; it does not track subsequent changes to the underlying ConfigMap file. This is a kernel-level behavior of bind mounts, not a Kubernetes bug. The tradeoff is that subPath is often required by legacy apps that expect config files at specific absolute paths and cannot read from a directory. The fix involves either changing the app to read from a directory or adding a sidecar/inotify watcher to copy updates into the subPath location.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:52:18.750607+00:00— report_created — created