早上部署了ranchar,k8s导入ranchar的时候,等了好久还在准备中,检查了一下k8s集群,发现原来集群状态不正常。
[root@k8s-m0001 ~]# kubectl get cs
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"}
然后检查监听,发现controller-manager和scheduler 未打开非安全端口。
[root@k8s-m0001 ~]# netstat -lnpt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:2379 0.0.0.0:* LISTEN 2866/etcd
tcp 0 0 10.211.55.27:2379 0.0.0.0:* LISTEN 2866/etcd
tcp 0 0 10.211.55.27:2380 0.0.0.0:* LISTEN 2866/etcd
tcp 0 0 127.0.0.1:35180 0.0.0.0:* LISTEN 994/kubelet
tcp 0 0 127.0.0.1:2381 0.0.0.0:* LISTEN 2866/etcd
tcp 0 0 0.0.0.0:30001 0.0.0.0:* LISTEN 3689/kube-proxy
tcp 0 0 127.0.0.1:10257 0.0.0.0:* LISTEN 2902/kube