kubenetes安装metrics-server时提示 the server is currently unable to handle the request

今天在安装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

你可能感兴趣的:(kubernetes)