Skip to main content

metrics-server


metrics server

https://ssup2.github.io/theory_analysis/Kubernetes_Metric_Server/

Installation

helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
helm repo update metrics-server \
&& helm search repo metrics-server -l | head -n 10
helm show values metrics-server/metrics-server \
--version 3.8.2 \
> metrics-server-values.yaml
metrics-server-values.yaml
args:
[]
# - --kubelet-insecure-tls
# - --v=2
info

로그에 "Failed to scrape node" err="Get \"https://xxx:10250/stats/summary?only_cpu_and_memory=true\": x509: cannot validate certificate for xxx because it doesn't contain any IP SANs" node="xxx"와 같은 에러가 발생하는 경우 --kubelet-insecure-tls를 추가해주세요.

kubectl create namespace monitoring
helm upgrade metrics-server metrics-server/metrics-server \
--install \
--version 3.8.2 \
-n monitoring \
-f metrics-server-values.yaml

Removal

helm uninstall -n monitoring metrics-server

Troubleshooting

kubectl describe apiservices v1beta1.metrics.k8s.io