<p>I have running Prometheus in k8s. Could you please advice how can I change running config <code>prometheus.yaml</code> in cluster? I just want simply to change:</p>

<pre><code>scrape_configs:
- job_name: my-exporter
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
</code></pre>

<p>How can I do this?</p>

<p>Thanks.</p>

JBB
<p>The recommended way is to provide the <code>prometheus.yml</code> via a ConfigMap. That way  changes in the ConfigMap will be propagated into the pod that consumes the configMap. However, that is not enough for prometheus to pick up the new config.</p>

<p>Prometheus supports <a href="https://www.robustperception.io/reloading-prometheus-configuration" rel="noreferrer">runtime reload of the config</a>, so that you don't need to stop prometheus in order to pickup the new config. You can either do that manually by sending a POST request as described in the link above, or automate this process by having a sidecar container inside the same prometheus pod that watch for updates to the config file and does the reload POST request.</p>

<p>The following is an example on the second approach: <a href="https://www.weave.works/blog/prometheus-configmaps-continuous-deployment/" rel="noreferrer">prometheus-configmaps-continuous-deployment</a> </p>
