How to Automatically Restart Deployment on ConfigMap Change
By default, Kubernetes does not automatically restart a Deployment when its ConfigMap changes. This can lead to situations where your pods keep running with outdated configuration until you trigger a rollout manually. Fortunately, there are common patterns to solve this. Why It Happens Kubernetes mounts ConfigMaps into pods as files or environment variables, but the Deployment controller does not track changes in ConfigMap content. That means no automatic restart. Solution Checksum annotations: Add a hash of the ConfigMap into the Deployment’s pod template annotations. Example in Helm: ...