解决k8s的kubectl get cs 显示不健康的问题:
参考地址: https://www.cnblogs.com/ltaodream/p/15185039.html
[root@m1 ~]# kubectl get cs
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME STATUS MESSAGE ERROR
scheduler Unhealthy Get "http://127.0.0.1:10251/healthz": dial tcp 127.0.0.1:10251: connect: connection refused
controller-manager Unhealthy Get "http://127.0.0.1:10252/healthz": dial tcp 127.0.0.1:10252: connect: connection refused
etcd-0 Healthy {"health":"true"}
解决:
[root@m1 ~]# vim /etc/kubernetes/manifests/kube-scheduler.yaml
#- --port=0 #将--port=0注释
[root@m1 ~]# vim /etc/kubernetes/manifests/kube-controller-manager.yaml
#- --port=0 #将--port=0注释
[root@m1 ~]# s
解决k8s的kubectl get cs 显示不健康的问题
最新推荐文章于 2024-05-18 09:12:06 发布