我要评分
获取效率
正确性
完整性
易理解

Verifying the Cluster

The following operations must be performed in a new window, and the window for starting the etcd cluster cannot be closed.

  1. Go to the /usr/local/etcd/bin directory and check the etcd version.
    cd /usr/local/etcd/bin
    ./etcd --version 

  2. View the cluster member list.
    ./etcdctl member list 

  3. Check the condition of cluster members. (Replace the IP addresses in the following command with the actual IP addresses.)
    ./etcdctl endpoint health --endpoints="10.208.71.111:2379,10.208.107.205:2379,10.208.72.182:2379"

    etcdctl is the CLI client for etcd.

  4. Check the leader of the cluster. The node whose IS LEADER value is true is the leader node.
    /usr/local/etcd/bin/etcdctl -w table --endpoints="10.208.71.111:2379,10.208.107.205:2379,10.208.72.182:2379" endpoint status

  5. Verify that data can be inserted into node 1 (the leader).
    /usr/local/etcd/bin/etcdctl put age 25
    /usr/local/etcd/bin/etcdctl put name angel

  6. Query the data you inserted (in step 5) on node 1.
    /usr/local/etcd/bin/etcdctl get age
    /usr/local/etcd/bin/etcdctl get name