今天在安装kubernetes metrics-server时,报错

Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io)

执行如下

[root@localhost ~]# kubectl top node
Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io)

解决方案:
在/etc/kubernetes/manifests/kube-apiserver.yaml 文件command字段下增加

--enable-aggregator-routing=true

然后重启kubelet便能解决

systemctl  restart  kubelet
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐