I've tried to change kube-proxy configMap and kube-proxy command to set metricsBindAddress
but kubernetes resets these changes(without any warnings) after couple seconds.
kubectl edit cm kube-proxy-config -n kube-system
=> add metricsBindAddress
=> wait couple seconds and open the config - there is empty metricsBindAddresskubectl edit ds kube-proxy -n kube-system
=> add --metrics-bind-address
to command => wait couple seconds => the command was reset to defaultHow to change kube-proxy config and keep these changes ?
Kubernetes version 1.17
UPDATE(as you can, after several seconds metricsBindAddress was changed to empty string):
UPDATE 2(pay attention on metricsBinAddress, it's changed after ~40-50 seconds):
FINAL UPDATE:
Answer from cloud provider(Yandex) - 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
p.s. https://github.com/helm/charts/tree/master/stable/prometheus-operator#kubeproxy - I want to make kube-proxy accessible by prometheus
I am posting this Community Wiki
because root cause of the issue has been determined.
Usually to change of metricsBindAddress:
can be achieved by editing ConfigMap and delete kube-proxy pod
or use rollout restart
on DaemonSet
.
Root cause of this issue was that this change was blocked by OP's environment - Yandex Cloud.
OP received feedback from Yandex Support
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