elect
for leader election:
etcdctl
command is used to conduct leader elections in an etcd cluster. It makes sure that only one client become leader at a time.ENDPOINTS
variable is set with the addresses of each etcd cluster members.Command format :
etcdctl --endpoints=$ENDPOINTS elect <election-name> <leader-name>
etcdctl --endpoints=$ENDPOINTS elect one p1
# another client with the same election name block
etcdctl --endpoints=$ENDPOINTS elect one p2
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.