Skip to main content

metrics-server


Installation​

helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/ \
&& helm repo update
mkdir -p monitoring/metrics-server/base
helm search repo metrics-server -l
helm show values metrics-server/metrics-server \
--version 3.7.0 \
> monitoring/metrics-server/base/values.yaml
monitoring/metrics-server/base/values.yaml
# ...

defaultArgs:
- --cert-dir=/tmp
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --metric-resolution=15s
# - --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λ₯Ό μΆ”κ°€ν•΄μ£Όμ„Έμš”.

helm upgrade metrics-server metrics-server/metrics-server \
--install \
--version 3.7.0 \
-n monitoring \
--create-namespace \
-f monitoring/metrics-server/base/values.yaml
helm get manifest -n monitoring metrics-server \
> monitoring/metrics-server/base/manifest.yaml

Troubleshooting​

kubectl describe apiservices v1beta1.metrics.k8s.io