When ever my pods try to query any kubelet endpoints (any port), they immediately get a connection refused.
My goal is to have prometheus get those metrics from cadvisor, and I am trying to create a ServiceMonitor to scrape the cadvisor metrics (for info on pod level resource usage).
Trying wget from any pod on my cluster results in the following:
$ wget 10.116.0.10:4194
Connecting to 10.116.0.10:4194 (10.116.0.10:4194)
wget: can't connect to remote host (10.116.0.10): Connection refused
I am running on DigitalOcean managed Kubernetes
edit: the above happens on any port, not just 4194
ServiceMonitor:
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: kubelet
labels:
app: prometheus
spec:
jobLabel: k8s-app
endpoints:
- port: cadvisor
interval: 15s
honorLabels: true
tlsConfig:
insecureSkipVerify: true
selector:
matchLabels:
k8s-app: kubelet
app.kubernetes.io/managed-by: prometheus-operator
app.kubernetes.io/name: kubelet
namespaceSelector:
matchNames:
- kube-system
metrics-serverand just scrap the data directly from kubernetes API as Prometheus was intended to do. - Hector Vidometrics-server, but it is not in Prometheus format, nor does it list all of the metrics on a single endpoint. - danthegoodman