<p>I've tried to change kube-proxy configMap and kube-proxy command to set <code>metricsBindAddress</code> but kubernetes resets these changes(without any warnings) after couple seconds.</p>
<ol>
<li><code>kubectl edit cm kube-proxy-config -n kube-system</code> =&gt; add <code>metricsBindAddress</code> =&gt; wait couple seconds and open the config - there is empty metricsBindAddress</li>
<li><code>kubectl edit ds kube-proxy -n kube-system</code> =&gt; add <code>--metrics-bind-address</code> to command =&gt; wait couple seconds =&gt; the command was reset to default</li>
</ol>
<p>How to change kube-proxy config and keep these changes ?</p>
<p>Kubernetes version 1.17</p>
<p>UPDATE(as you can, after several seconds metricsBindAddress was changed to empty string):
<a href="https://i.stack.imgur.com/WF4m9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WF4m9.png" alt="enter image description here" /></a></p>
<p>UPDATE 2(pay attention on metricsBinAddress, it's changed after ~40-50 seconds):
<a href="https://i.stack.imgur.com/G9p5x.png" rel="noreferrer"><img src="https://i.stack.imgur.com/G9p5x.png" alt="enter image description here" /></a></p>
<p><strong>FINAL UPDATE</strong>:
Answer from cloud provider(Yandex) - <code>kube-proxy pod it is on the host's network, so to prevent security problems, it listens exclusively on the loopback address and therefore the parameter will be reset</code></p>
<p>p.s. <a href="https://github.com/helm/charts/tree/master/stable/prometheus-operator#kubeproxy" rel="noreferrer">https://github.com/helm/charts/tree/master/stable/prometheus-operator#kubeproxy</a> - I want to make kube-proxy accessible by prometheus</p>

Suleiman
<p>First edit:</p>
<pre><code>kubectl edit cm/kube-proxy -n kube-system

.....
metricsBindAddress: 0.0.0.0:10249
.....
</code></pre>
<p>Then,</p>
<pre><code>kubectl rollout restart ds kube-proxy -n kube-system
</code></pre>
<p>You have to restart the pods otherwise they do not get the configuration.
You can check the status by:</p>
<pre><code>kubectl rollout status ds kube-proxy -n kube-system
</code></pre>
