gpt4 book ai didi

kubernetes - 来自服务器的错误 (ServiceUnavailable) : the server is currently unable to handle the request (get nodes. metrics.k8s.io)

转载 作者:行者123 更新时间:2023-12-02 11:44:04 25 4
gpt4 key购买 nike

运行“kubectl top nodes”时出现错误:

来自服务器的错误(ServiceUnavailable):服务器当前无法处理请求(get nodes.metrics.k8s.io)

k8s version:
kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920", GitTreeState:"clean", BuildDate:"2018-12-13T10:39:04Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920", GitTreeState:"clean", BuildDate:"2018-12-13T10:31:33Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}

[root@manager ~]# kubectl api-versions
admissionregistration.k8s.io/v1beta1
apiextensions.k8s.io/v1beta1
apiregistration.k8s.io/v1
apiregistration.k8s.io/v1beta1
apps/v1
apps/v1beta1
apps/v1beta2
authentication.k8s.io/v1
authentication.k8s.io/v1beta1
authorization.k8s.io/v1
authorization.k8s.io/v1beta1
autoscaling/v1
autoscaling/v2beta1
autoscaling/v2beta2
batch/v1
batch/v1beta1
certificates.k8s.io/v1beta1
coordination.k8s.io/v1beta1
events.k8s.io/v1beta1
extensions/v1beta1
metrics.k8s.io/v1beta1
networking.k8s.io/v1
policy/v1beta1
rbac.authorization.k8s.io/v1
rbac.authorization.k8s.io/v1beta1
scheduling.k8s.io/v1beta1
storage.k8s.io/v1
storage.k8s.io/v1beta1
v1

[root@manager ~]# kubectl get po --all-namespaces

NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-86c58d9df4-km7jc 1/1 Running 0 2d21h
kube-system coredns-86c58d9df4-vltm9 1/1 Running 0 2d21h
kube-system etcd-manager 1/1 Running 0 2d23h
kube-system kube-apiserver-manager 1/1 Running 0 5h47m
kube-system kube-controller-manager-manager 1/1 Running 1 2d23h
kube-system kube-flannel-ds-amd64-5g8w8 1/1 Running 0 2d23h
kube-system kube-flannel-ds-amd64-69lcm 1/1 Running 0 2d23h
kube-system kube-flannel-ds-amd64-9hx2f 1/1 Running 0 2d23h
kube-system kube-proxy-9s6zm 1/1 Running 0 2d23h
kube-system kube-proxy-k4qwz 1/1 Running 0 2d23h
kube-system kube-proxy-wnzgd 1/1 Running 0 2d23h
kube-system kube-scheduler-manager 1/1 Running 1 2d23h
kube-system kubernetes-dashboard-79ff88449c-7fpw6 1/1 Running 0 2d23h
kube-system metrics-server-68d85f76bb-pj8bs 1/1 Running 0 111m
kube-system tiller-deploy-5478b6c547-bf82v 1/1 Running 0 4h7m

[root@manager ~]# kubectl logs -f -n kube-system metrics-server-68d85f76bb-pj8bs

I1217 06:42:43.451782 1 serving.go:273] Generated self-signed cert (apiserver.local.config/certificates/apiserver.crt, apiserver.local.config/certificates/apiserver.key)
[restful] 2018/12/17 06:42:44 log.go:33: [restful/swagger] listing is available at https://:443/swaggerapi
[restful] 2018/12/17 06:42:44 log.go:33: [restful/swagger] https://:443/swaggerui/ is mapped to folder /swagger-ui/
I1217 06:42:44.099720 1 serve.go:96] Serving securely on [::]:443

并且没有系统错误日志。
我该如何解决这个问题?

操作系统是:CentOS Linux 版本 7.5.1804(核心)

最佳答案

此问题已得到解决:

  • 删除代理 ( file:/etc/kubernetes/manifests/kube-apiserver.yaml )
  • 重启 kubelet 服务
  • kubectl top nodes现在应该工作

    关于kubernetes - 来自服务器的错误 (ServiceUnavailable) : the server is currently unable to handle the request (get nodes. metrics.k8s.io),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53811388/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com