__director

metrics-server

Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)

[root@init 1.8+]# kubectl logs -n kube-system metrics-server-8658cdd7f6-fxjsb
I0216 02:16:01.567098 1 serving.go:312] Generated self-signed cert (apiserver.local.config/certificates/apiserver.crt, apiserver.local.config/certificates/apiserver.key)
W0216 02:16:02.138580 1 authentication.go:296] Cluster doesn't provide requestheader-client-ca-file in configmap/extension-apiserver-authentication in kube-system, so request-header client certificate authentication won't work.
I0216 02:16:02.160789 1 secure_serving.go:116] Serving securely on [::]:443

 

Error from server (Forbidden): nodes.metrics.k8s.io "init" is forbidden: User "system:kube-proxy" cannot get resource "nodes" in API group "metrics.k8s.io" at the cluster scope

command:
- /metrics-server
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalDNS,InternalIP,ExternalDNS,ExternalIP,Hostname

--enable-aggregator-routing=true \
--requestheader-client-ca-file=/opt/kubernetes/ssl/ca.pem \
--proxy-client-cert-file=/opt/kubernetes/ssl/kube-proxy.pem \
--proxy-client-key-file=/opt/kubernetes/ssl/kube-proxy-key.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 create clusterrolebinding kube-proxy-cluster-admin --clusterrole=cluster-admin --user=system:kube-proxy

posted on 2021-02-16 10:39  __director  阅读(174)  评论(0)    收藏  举报

导航