当我这样做kubectl top pods/nodes
时,我收到以下错误:
指标尚不可用
当我检查我得到的日志时
$ kubectl logs metrics-server-7df4c4484d-h75wr -n kube-system -c metrics-server
I1008 12:02:55.159069 1 serving.go:273] Generated self-signed cert(apiserver.local.config/certificates/apiserver.crt, apiserver.local.config/certificates/apiserver.key)
[restful] 2018/10/08 12:02:56 log.go:33: [restful/swagger] listing is available at https://:443/swaggerapi
[restful] 2018/10/08 12:02:56 log.go:33: [restful/swagger] https://:443/swaggerui/ is mapped to folder /swagger-ui/
I1008 12:02:56.358063 1 serve.go:96] Serving securely on [::]:443
E1008 12:03:04.225519 1 reststorage.go:101] unable to fetch node metrics for node "hpa-test": no metrics known for node "hpa-test"
E1008 12:03:07.619489 1 reststorage.go:101] unable to fetch node metrics for node "hpa-test": no metrics known for node "hpa-test"
此外,我可以从以下位置 ping 到 hpa-test 节点:
$ kubectl exec -it metrics-server-7df4c4484d-h75wr -n kube-system sh
另外,我尝试到处寻找解决方案,但没有解决问题