網站首頁 編程語言 正文
Kubeadm:如何解決kubectl get cs顯示scheduler Unhealthy,controller-manager Unhealthy
作者:Kevin古月 更新時間: 2022-04-01 編程語言報錯顯示
[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.查看端口
首先確認沒有啟動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.確認schedule和controller-manager組件配置是否禁用了非安全端口
配置文件路徑為:/etc/kubernetes/manifests/kube-scheduler.yaml和/etc/kubernetes/manifests/kube-controller-manager.yaml
將兩個配置文件中–port注釋掉
最后重啟kubelet服務就可以了,再次查看
[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
相關推薦
- 2023-05-30 docker運行nginx綁定配置文件失敗原因以及問題解決_docker
- 2022-09-21 Android開發之AAR文件的生成與使用步驟_Android
- 2022-11-14 正則表達式手冊以備平時自己看
- 2023-04-07 C語言高級教程之變長數組詳解_C 語言
- 2022-07-16 uniCloud云開發獲取小程序用戶openid
- 2023-10-15 歸并排序三種常見寫法
- 2023-07-02 oracle數據庫排序后如何獲取第一條數據_oracle
- 2022-09-04 Go語言指針用法詳解_Golang
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支