Kubeadm:如何解决kubectl get cs显示scheduler Unhealthy,controller-manager Unhealthy
报错显示
[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:*