<p>I have deployed Prometheus on Kubernetes and I provide the <code>prometheus.yml</code> configuration file as a config map resource.
The file is mounted in the Prometheus pod as volume.</p>

<p>After the config map is changed in the cluster, I hit the Prometheus server endpoint with an empty POST request, in order to reload it (as described in the documentation)</p>

<p>When I make changes to the config map however and redeploy it, I experience a 'lag' of around 30 secs until the <code>prometheus.yml</code> file is updated inside the pod.</p>

<p>I read <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#mounted-configmaps-are-updated-automatically" rel="nofollow noreferrer">here</a> that this is expected.</p>

<p>However, there are projects that try to remedy this, eg</p>

<ul>
<li><a href="https://github.com/pusher/wave" rel="nofollow noreferrer">https://github.com/pusher/wave</a></li>
<li><a href="https://github.com/stakater/Reloader" rel="nofollow noreferrer">https://github.com/stakater/Reloader</a></li>
<li><a href="https://github.com/jimmidyson/configmap-reload" rel="nofollow noreferrer">https://github.com/jimmidyson/configmap-reload</a></li>
</ul>

<p>These, as I understand, kill the pods and replace them in order to update the configuration.</p>

<p>My question is, is there a way to make a 'hot' reconfiguration? </p>

<p>Essentially speed up on-demand the volume update inside the pod, without the need of killing any pod.</p>

<p>I'm using right now reloader and the pods are killed always but they are recreated immediately after you change a configmap associated.</p>

<p>But you cannot avoid the fact that you need to kill the pod to be able to re-mount the volume with the new config and also it depends on your workload if is able to load a new configuration without stopping the main process inside the container.</p>
