prometheus-kubernetes
prometheus-kubernetes copied to clipboard
Kubelet Connection Refused
Hi camilb,
Before i describe my problem, i want to thank you for your amazing work.
My scenario is: Kubernetes AWS EKS with autoscaling V1.11.
Everything is ok except the kubelet is try to connect on port 10255 but in server kubelet is listen in port 10250.
How can i fix this ?
I try to change my service monitor for: **``` apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: k8s-app: kubelet name: kubelet namespace: monitoring spec: endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token honorLabels: true interval: 30s port: https-metrics scheme: https tlsConfig: insecureSkipVerify: true
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
honorLabels: true
interval: 30s
metricRelabelings:
- action: drop
regex: container_([a-z_]+);
sourceLabels:
- name
- image
- action: drop
regex: container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s)
sourceLabels:
- name path: /metrics/cadvisor port: https-metrics scheme: https tlsConfig: insecureSkipVerify: true jobLabel: k8s-app namespaceSelector: matchNames:
- kube-system selector: matchLabels: k8s-app: kubelet
- action: drop
regex: container_([a-z_]+);
sourceLabels:
And for this without success.
**apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: kubelet
labels:
k8s-app: kubelet
spec:
jobLabel: k8s-app
endpoints:
- path: /metrics/cadvisor
port: http-metrics
interval: 30s
honorLabels: true
selector:
matchLabels:
k8s-app: kubelet
targetLabels:
- app
- prometheus
- beta.kubernetes.io/instance-type
- kops.k8s.io/instancegroup
- failure-domain.beta.kubernetes.io/zone
- name
- address
namespaceSelector:
matchNames:
- kube-system**
Thanks.
Problem solve.
Change port to port: https-metrics
Thanks.
You can close.