部署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 \
试了好多种办法,也没有解决。
标签:kubectl,21,Kubernetes,--,server,metrics,requestheader,go From: https://blog.51cto.com/u_15941303/6006306