Kubernetes ConfigMap Update Fails to Refresh Env Vars

A production service was failing to connect to the database. We updated the ConfigMap with the correct DB_HOST. Pods kept using the old value. Why? The ConfigMap was injected as environment variables. Kubernetes injects env vars only at container startup. Updating the ConfigMap did nothing until we restarted the pods. Takeaway: ConfigMaps don’t reload. Env vars are immutable at runtime. #InfraDecode #Kubernetes #DevOps

To view or add a comment, sign in

Explore content categories