...
Connection refused for KubeProxy
The metrics bind address of kube-proxy is default toto 127.0.0.1:10249
that that prometheus instancescannotaccess instances cannot access to. You should expose metrics by changingchanging metricsBindAddress
field field value toto 0.0.0.0:10249
if if you want to collect them. To To perform the modification, we access, in editing mode, the kube-proxy
configmap ConfigMap
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# We access the ConfigMap via the command "$ kubectl edit cm kube-proxy -n kube-system" and then apiVersion: v1 data: config.conf: |- . . . kind: KubeProxyConfiguration metricsBindAddress: 0.0.0.0:10249 # <--- Edit this field . . . |
You have to restart the pods otherwise they do not get the configuration. Therefore we perform a rollout of the kube-proxy
DaemonSet
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$ kubectl rollout restart ds kube-proxy -n kube-system # You can check the status by $ kubectl rollout status ds kube-proxy -n kube-system |
...