目录

componentstatus问题

目录

问题背景

执行kubectl get cs有如下报错

1
2
3
4
5
6
NAME                 STATUS      MESSAGE
scheduler            Unhealthy   Get http://127.0.0.1:10251/healthz: dial tcp 12
controller-manager   Unhealthy   Get http://127.0.0.1:10252/healthz: dial tcp 12
etcd-0               Healthy     {"health":"true"}
etcd-2               Healthy     {"health":"true"}
etcd-1               Healthy     {"health":"true"}

原因为集群的 apiserver 与 controller-manager 和 scheduler 不在同一个节点导致的,这个不影响功能 可以看下这个:

kubectl get componentstatus shows unhealthy

另外关于componentstatus 这个在后续新版已经被弃用了

Build software better, together