Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically deploy when configMap changes

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

like image 741
Hammed Avatar asked Jul 31 '26 23:07

Hammed


2 Answers

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.

like image 75
coderanger Avatar answered Aug 02 '26 16:08

coderanger


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

like image 20
P Ekambaram Avatar answered Aug 02 '26 17:08

P Ekambaram



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!