기타/K8S
Kubernetes) Metrics server 오류_kubelet-insecure-tls
MightyTedKim
2021. 11. 16. 21:25
728x90
반응형
`kubelet-insecure-tls`
==================================
오류
==================================
$ k top node kube02
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io kube02)
==================================
상황
==================================
$ k get nodes
NAME STATUS ROLES AGE VERSION
kube01 Ready control-plane,master,worker 70d v1.20.4
kube02 Ready worker 66d v1.20.4
kube03 Ready worker 66d v1.20.4
kube04 Ready worker 66d v1.20.4
$ k logs metrics-server-7d7847476c-r9p7c -n kube-system --follow
I1116 05:45:37.405482 1 serving.go:341] Generated self-signed cert (/tmp/apiserver.crt, /tmp/apiserver.key)
E1116 05:45:37.948151 1 scraper.go:139] "Failed to scrape node" err="Get \"https://1**.17.**2.88:10**0/stats/summary?only_cpu any IP SANs" node="kube03"
E1116 05:45:37.952198 1 scraper.go:139] "Failed to scrape node" err="Get \"https://1**.17.**2.86:10**0/stats/summary?only_cpu any IP SANs" node="kube01"
$ k describe metrics-server-7d7847476c-r9p7c -n kube-system
Normal Killing 59s kubelet Container metrics-server failed liveness probe, will be restarted
Normal Created 58s (x2 over 117s) kubelet Created container metrics-server
Normal Started 58s (x2 over 117s) kubelet Started container metrics-server
Warning Unhealthy 19s (x5 over 99s) kubelet Liveness probe failed: HTTP probe failed with statuscode: 500
Warning Unhealthy 16s (x6 over 116s) kubelet Readiness probe failed: HTTP probe failed with statuscode: 500
==================================
수정
==================================
$ k edit deploy -n kube-system metrics-server
args:
- --kubelet-insecure-tls
==================================
해결
==================================
$ k top node kube02
NAME CPU(cores) CPU% MEMORY(bytes) MEMORY%
kube02 322m 4% 10305Mi 34%
참고
- https://github.com/kubernetes-sigs/metrics-server/issues/614
728x90
반응형