Automatically deploy when configMap changes

4/27/2020

Does anyone know how to get a Kubernetes deployment to automatically update when a configMap is changed?

-- Tee Hammed
configmap
kubernetes
kubernetes-helm

2 Answers

4/27/2020

Unfortunately there is nothing built in for this. You used the helm tag, so with Helm you do this by setting a checksum of the rendered configmap (or secret, same issue there) as an annotation in the pod template. This means that changing the configmap results in a (meaningless) change to the pod template, which triggers a rolling update.

-- coderanger
Source: StackOverflow

4/28/2020

Consider reloader, a kubernetes controller, that watches changes to configmaps and secrets and will trigger a deployment when there is any change --> https://github.com/stakater/Reloader

-- P Ekambaram
Source: StackOverflow