Restart your pod when you change the config
In some cases, like Spring Boot apps, the app only reads configuration properties at startup. If you have this configuration in a configmap while your spring app runs as a deployment, changing the configuration will not by default trigger the deployment to redeploy. Which can be annoying, because that means the running app is out of sync with the desired configuration.
A relatively simple solution to this issue is adding a hash of the relevant configmap as an annotation to your deployment.
spec:
template:
metadata:
annotations:
checksum/config-map: { { include (print $.Template.BasePath "/configmap.yaml") . | sha256sum } }
By changing the configmap, the hash will change, and therefore the Kubelet will be notified of a deployment change, triggering a redeployment. Problem solved!