[root@kube-etcd etcd]# etcdctl -C http://etcd:2379 cluster-health
cluster may be unhealthy: failed to list members
Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp: lookup etcd on 114.114.114.114:53: no such host
error #0: dial tcp: lookup etcd on 114.114.114.114:53: no such host
[root@kube-etcd etcd]# vi /etc/hosts 配置hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.0.10 etcd
10.0.0.11 kube-master
10.0.0.12 kube-node-1
10.0.0.13 kube-node-2
10.0.0.14 kube-node-3
[root@kube-etcd etcd]# etcdctl -C http://etcd:2379 cluster-health
member 8e9e05c52164694d is healthy: got healthy result from http://kube-etcd:2379
cluster is healthy
[root@kube-etcd etcd]# etcdctl -C http://etcd:4001 cluster-health
member 8e9e05c52164694d is healthy: got healthy result from http://kube-etcd:2379
cluster is healthy