mkdir  -p  /root/etcd
cd  /root/etcd/
wget https://github.com/etcd-io/etcd/releases/download/v3.2.12/etcd-v3.2.12-linux-amd64.tar.gz
tar xf etcd-v3.2.12-linux-amd64.tar.gz
cd etcd-v3.2.12-linux-amd64
cp etcd  etcdctl  /opt/kubernetes/bin/
cat >/opt/kubernetes/cfg/etcd </usr/lib/systemd/system/etcd.service < 
  

etcd另外两个节点只需要把配置文件拷过去 ip地址修改下就行

systemctl daemon-reload

systemctl  start  etcd


 /opt/kubernetes/bin/etcdctl  --ca-file=/opt/kubernetes/ssl/ca.pem --cert-file=/opt/kubernetes/ssl/server.pem --key-file=/opt/kubernetes/ssl/server-key.pem  --endpoints="https://192.168.56.10:2379,https://192.168.56.11:2379,https://192.168.56.12:2379"  cluster-health

member 29767d8c58265682 is healthy: got healthy result from https://192.168.56.11:2379

member 619282a432c51a75 is healthy: got healthy result from https://192.168.56.10:2379

member 7c2c22d4a9afce32 is healthy: got healthy result from https://192.168.56.12:2379

cluster is healthy