Kubernetes GKE度量服务器

Kubernetes GKE度量服务器,kubernetes,google-kubernetes-engine,Kubernetes,Google Kubernetes Engine,如何重新应用默认安装的GKE metric server?它还会返回TOP命令统计信息吗 我尝试安装并删除了metric server的,现在它可能已经删除了一些与默认GKE metric server相关的角色。我甚至尝试重新安装GitHub版本,但仍然出现错误 kubectl top pods --all-namespaces Error from server (ServiceUnavailable): the server is currently unable to handle th

如何重新应用默认安装的GKE metric server?它还会返回
TOP
命令统计信息吗

我尝试安装并删除了metric server的,现在它可能已经删除了一些与默认GKE metric server相关的角色。我甚至尝试重新安装GitHub版本,但仍然出现错误

kubectl top pods --all-namespaces
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io)
kubectl top pods --all-namespaces
Error from server (InternalError): an error on the server ("Internal Server Error: \"/apis/metrics.k8s.io/v1beta1/pods\": Unauthorized") has prevented the request from succeeding (get pods.metrics.k8s.io)
GKE正在运行以下吊舱

metrics-server-v0.3.6-7c5cb99b6f-npgzv
gke-metrics-agent-wkg5b

如何重新应用默认安装的GKE metric server

首先获取度量服务器pod的名称:

kubectl get pods --all-namespaces
删除pod:

kubectl delete pod metrics-server-v0.3.6-547dc87f5f-sctcp -n kube-system
由于metric server由Google管理,删除后将使用不同的pod名称重新安装一个新的服务器

它还会返回顶级命令统计信息吗? 比如说,

kubectl top pod metrics-server-v0.3.6-547dc87f5f-sctcp --containers -n kube-system