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
=> addmetricsBindAddress
=> 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 default
How 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
""
instead of the address I set – Delkv1.17.17
and have onlykube-proxy
configmap and you are editing configmap namedkube-proxy-config
. What environment you are using, its local or cloud env? Are you using some specific configuration or it's fresh cluster and you just wanted to editkube-proxy
configmap? – LanfriServer Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.12", GitCommit:"5ec472285121eb6c451e515bc0a7201413872fa3", GitTreeState:"clean", BuildDate:"2020-09-16T13:32:12Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
|Depending on the cluster, the relevant part config.conf will be in ConfigMap kube-system/kube-proxy or kube-system/kube-proxy-config
(c) github.com/helm/charts/tree/master/stable/… Cloud environment, it's fresh cluster – Delk