Hacker News new | ask | show | jobs
by byxorna 2711 days ago
K8s will update mounted ConfigMaps "live" in your pod, by updating a symlink. If your application is using inotify or file polling to watch the ConfigMap as a volume, you can reconfigure your app when changes happen (or signal your liveness probe you should be terminated to reload latest config).
1 comments

This partly solves a big problem for me, which was how do I keep those configmaps up to date for a bunch of customers with a legacy application that writes UI config updates to a local xml config file. I wanted that file to live inside of configmaps but I have this problem. I already found a bash script that does inotify pushes to git (called git-watch), but I didn't have the other half of this equation. The missing half was getting those new config changes applied back into the configmap.