kubelet
kubelet
kubectl get --raw /api/v1/nodes/<nodeName>/proxy/metrics
kubectl get --raw /api/v1/nodes/<nodeName>/proxy/metrics/cadvisor
kubectl get --raw /api/v1/nodes/<nodeName>/proxy/metrics/probes
설치
kube-prometheus-stack
kube-prometheus-stack-values.yaml
kubernetesServiceMonitors:
enabled: true
kubelet:
enabled: true
serviceMonitor:
additionalLabels: {}
prometheusOperator:
enabled: true
kubeletService:
enabled: true
namespace: kube-system
# '{{ template "kube-prometheus-stack.fullname" . }}-kubelet' by default
name: ""
Metrics
- https://kubernetes.io/docs/reference/instrumentation/metrics/
- https://github.com/google/cadvisor/blob/master/docs/storage/prometheus.md
container
_cpu
_usage_seconds_total
- CPU 사용량:
sum by(pod) (rate(container_cpu_usage_seconds_total[1m]))
- CPU 사용량: