網(wǎng)站首頁 編程語言 正文
Kubeadm:如何解決kubectl get cs顯示scheduler Unhealthy,controller-manager Unhealthy
作者:Kevin古月 更新時(shí)間: 2022-04-01 編程語言報(bào)錯(cuò)顯示
[root@k8s-master ~]# kubectl get cs
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME STATUS MESSAGE OR
scheduler Unhealthy Get "http://127.0.0.1:10251/healthz": dial tcp 127.0.0.1:10
controller-manager Unhealthy Get "http://127.0.0.1:10252/healthz": dial tcp 127.0.0.1:10
etcd-0 Healthy {"health":"true"}
排障思路
1.查看端口
首先確認(rèn)沒有啟動(dòng)10251、10252端口
[root@k8s-master ~]# netstat -ntlup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program
tcp 0 0 127.0.0.1:10248 0.0.0.0:* LISTEN 72329/kubele
tcp 0 0 127.0.0.1:10249 0.0.0.0:* LISTEN 72826/kube-p
tcp 0 0 127.0.0.1:9099 0.0.0.0:* LISTEN 91238/calico
tcp 0 0 20.0.0.56:2379 0.0.0.0:* LISTEN 71856/etcd
tcp 0 0 127.0.0.1:2379 0.0.0.0:* LISTEN 71856/etcd
tcp 0 0 20.0.0.56:2380 0.0.0.0:* LISTEN 71856/etcd
tcp 0 0 127.0.0.1:2381 0.0.0.0:* LISTEN 71856/etcd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 9519/X
tcp 0 0 127.0.0.1:10257 0.0.0.0:* LISTEN 34287/kube-c
tcp 0 0 127.0.0.1:10259 0.0.0.0:* LISTEN 34472/kube-s
tcp 0 0 0.0.0.0:179 0.0.0.0:* LISTEN 112065/bird
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 9978/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 9418/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 9415/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 9687/master
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 91446/sshd:
tcp 0 0 127.0.0.1:39451 0.0.0.0:* LISTEN 72329/kubele
tcp6 0 0 :::10250 :::* LISTEN 72329/kubele
tcp6 0 0 :::6443 :::* LISTEN 88744/kube-a
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 :::10256 :::* LISTEN 72826/kube-p
tcp6 0 0 :::6000 :::* LISTEN 9519/X
tcp6 0 0 :::22 :::* LISTEN 9418/sshd
tcp6 0 0 ::1:631 :::* LISTEN 9415/cupsd
tcp6 0 0 ::1:25 :::* LISTEN 9687/master
tcp6 0 0 ::1:6010 :::* LISTEN 91446/sshd:
udp 0 0 0.0.0.0:5353 0.0.0.0:* 8687/avahi-d
udp 0 0 192.168.122.1:53 0.0.0.0:* 9978/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 9978/dnsmasq
udp 0 0 0.0.0.0:111 0.0.0.0:* 1/systemd
udp 0 0 127.0.0.1:323 0.0.0.0:* 8653/chronyd
udp 0 0 0.0.0.0:53873 0.0.0.0:* 8687/avahi-d
udp 0 0 0.0.0.0:747 0.0.0.0:* 8631/rpcbind
udp6 0 0 :::111 :::* 1/systemd
udp6 0 0 ::1:323 :::* 8653/chronyd
udp6 0 0 :::747 :::*
2.確認(rèn)schedule和controller-manager組件配置是否禁用了非安全端口
配置文件路徑為:/etc/kubernetes/manifests/kube-scheduler.yaml和/etc/kubernetes/manifests/kube-controller-manager.yaml
將兩個(gè)配置文件中–port注釋掉
最后重啟kubelet服務(wù)就可以了,再次查看
[root@k8s-master manifests]# kubectl get cs
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME STATUS MESSAGE ERROR
controller-manager Healthy ok
scheduler Healthy ok
etcd-0 Healthy {"health":"true"}
原文鏈接:https://blog.csdn.net/m0_47219942/article/details/115231303
相關(guān)推薦
- 2022-02-26 Hutool cn.hutool.core.bean.BeanException: Set valu
- 2022-09-22 Laravel解決高并發(fā)問題的思路
- 2023-02-02 C++實(shí)現(xiàn)延遲的方法詳解_C 語言
- 2021-12-08 Vmware虛擬機(jī)設(shè)置固定IP地址的方法(?圖文教程)_VMware
- 2022-10-03 正則表達(dá)式中^和$的含義與實(shí)例代碼_正則表達(dá)式
- 2023-07-04 spring之BeanDefinition
- 2022-06-02 GO中?分組聲明與array,?slice,?map函數(shù)_Golang
- 2022-05-21 Python學(xué)習(xí)之包與模塊詳解_python
- 欄目分類
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲(chǔ)小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯(cuò)誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實(shí)現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡(jiǎn)單動(dòng)態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對(duì)象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊(duì)列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支