• 欢迎访问显哥博客,本网站纯属学习技术,绝无商业用途,欢迎小伙伴们共同学习!研究技术!QQ:52249909 加我QQ
  • 世界75亿人,这么小的概率,能认识你,是我一生的幸运,不妨加个QQ接触一下:52249909 加我QQ

k8s故障排查componentstatus-Rancher污点【显哥出品,必为精品】

K8S lixian 2年前 (2022-04-10) 9732次浏览 1个评论 扫描二维码

问题描述

k8s故障排查componentstatus-Rancher污点【显哥出品,必为精品】

[root@master ~]# kubectl get componentstatus
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME                 STATUS      MESSAGE                                                                                       ERROR
controller-manager   Unhealthy   Get "http://127.0.0.1:10252/healthz": dial tcp 127.0.0.1:10252: connect: connection refused   
scheduler            Unhealthy   Get "http://127.0.0.1:10251/healthz": dial tcp 127.0.0.1:10251: connect: connection refused   
etcd-0               Healthy     {"health":"true"}

解决方法

k8s故障排查componentstatus-Rancher污点【显哥出品,必为精品】

<a href="https://www.lixian.fun/wp-content/uploads/2022/04/2022041005071510.png"><img src="https://www.lixian.fun/wp-content/uploads/2022/04/2022041005071510.png" alt="" class="aligncenter size-full wp-image-5110" /></a>
#修改上面对应的文件,哪个模块不健康就修改哪个
#出现这种情况是kube-controller-manager.yaml和kube-scheduler.yaml设置的默认端口是0,在配置文件中注释掉“- --port=0”并重启服务就可以了。每台master节点都要执行操作
vim /etc/kubernetes/manifests/kube-scheduler.yaml
#--port=0

正常

[root@master ~]# kubectl get componentstatus
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME                 STATUS    MESSAGE             ERROR
controller-manager   Healthy   ok                  
scheduler            Healthy   ok                  
etcd-0               Healthy   {"health":"true"} 

本站博主 , 版权所有丨如未注明 , 均为原创
转载请注明原文链接:k8s故障排查componentstatus-Rancher污点【显哥出品,必为精品】
喜欢 (2)

您必须 登录 才能发表评论!

(1)个小伙伴在吐槽
  1. I am a student of BAK College. The recent paper competition gave me a lot of headaches, and I checked a lot of information. Finally, after reading your article, it suddenly dawned on me that I can still have such an idea. grateful. But I still have some questions, hope you can help me.