<p>I am using prometheus operator to monitor my Kubernetes  cluster. I want to change the scrape_interval for some targets dynamically (increase and decrease it when needed at runtime).</p>

<p>Any suggestions to do that?</p>

<p>Thanks</p>

khaoulaZ
<pre><code>kubectl get secret -n monitoring prometheus-k8s -o json | jq  -r '.data.&quot;prometheus.yaml.gz&quot;' | base64 -d | gzip -d
</code></pre>
<p>and then</p>
<pre><code>kubectl edit secret -n monitoring prometheus-k8s
</code></pre>
