查看版本号
v3
./etcdctl version
V2
./etcdctl --version
查看集群成员信息
./etcdctl member list
查看集群状态(Leader节点)
V3
./etcdctl --write-out=table endpoint status
V2
./etcdctl cluster-health
查看leader状态
curl http://127.0.0.1:2379/v2/stats/leader
查看自己的状态
curl http://127.0.0.1:2379/v2/stats/self
参数 --endpoints (远程调用)
./etcdctl --endpoints=127.0.0.1:2379 version
./etcdctl --endpoints=192.168.118.131:2379,192.168.118.132:2379,192.168.118.133:2379 --write-out=table endpoint status

租约(V3过期设置代替为租约)

3.维持租约 不停止会一直续租
观察者

指定waitIndex参数为14的话会一直等到modifiedIndex为14才响应
原子操作

事务



分布式锁

选举

网友评论