概述
部署metrics-server时,pod能正常启动,但是不能正常使用
kubectl top pods
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io)
查看日志如下:
# kubectl logs -f pod/metrics-server-7cccb5464-n8wwn -n kube-system -c metrics-server
I0404 05:21:09.136867 1 serving.go:273] Generated self-signed cert (apiserver.local.config/certificates/apiserver.crt, apiserver.local.config/certificates/apiserver.key)
[restful] 2019/04/04 05:21:10 log.go:33: [restful/swagger] listing is available at https://:443/swaggerapi
[restful] 2019/04/04 05:21:10 log.go:33: [restful/swagger] https://:443/swaggerui/ is mapped to folder /swagger-ui/
I0404 05:21:10.729295 1 serve.go:96] Serving securely on [::]:443
----------------------------------------------------
kube-api中已经加了聚合层配置
--requestheader-client-ca-file=/etc/kubernetes/ssl/ca.pem
--requestheader-allowed-names=aggregator
--requestheader-extra-headers-prefix=X-Remote-Extra-
--requestheader-group-headers=X-Remote-Group
--requestheader-username-headers=X-Remote-User
试了好多种办法,也没有解决。
最后
以上就是机灵泥猴桃为你收集整理的Kubernetes metrics-server: kubectl top nodes Error from server (ServiceUnavailable): 怎么解决?的全部内容,希望文章能够帮你解决Kubernetes metrics-server: kubectl top nodes Error from server (ServiceUnavailable): 怎么解决?所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复