Prometheus - kube-proxy endpoint connection refused

When using kube-prometheus-stack and kubernetes cluster provisioned by kubeadm you will likely have an issue of prometheus not being able to connect to the kube-proxy metrics

It can be easily fixed by editing it’s config map

kubectl edit cm/kube-proxy -n kube-system

Change the metricsBindAddress property from 127.0.0.1:10249 (or empty value) to

metricsBindAddress: 0.0.0.0:10249

Delete and redeploy kube-proxy pods

kubectl delete pod -l k8s-app=kube-proxy -n kube-system

Copyright

Comments