ETCD etcdctl操作

#查看etcd是否需健康
etcdctl --endpoints=https://127.0.0.1:2379 --cert-file=/usr/.certs/etcd/cert.pem --key-file=/usr/.certs/etcd/key.pem --ca-file=/usr/.certs/etcd/ca.pem cluster-health

#列出etcd内容
etcdctl --endpoints=https://127.0.0.1:2379 --cert-file=/usr/.certs/etcd/cert.pem --key-file=/usr/.certs/etcd/key.pem --ca-file=/usr/.certs/etcd/ca.pem ls -recursive

#删除
etcdctl --endpoints=https://127.0.0.1:2379 --cert-file=/usr/.certs/etcd/cert.pem --key-file=/usr/.certs/etcd/key.pem --ca-file=/usr/.certs/etcd/ca.pem rm -recursive  swarm
key名称

#查看所有
etcdctl --endpoints=https://127.0.0.1:2379 --cert-file=/usr/.cert/cert.pem --key-file=/usr/.cert/key.pem --ca-file=/usr/.cert/ca.pem ls -recursive

#查看集群健康
etcdctl --endpoints=https://127.0.0.1:2379 --cert-file=/usr/.cert/cert.pem --key-file=/usr/.cert/key.pem --ca-file=/usr/.cert/ca.pem cluster-health


你可能感兴趣的:(ETCD)