etcd 3.7
How to conduct leader election in etcd cluster
Official etcd 3.7 guides for developers, operators, upgrades, APIs, and internals.
Prerequisites
Conduct Leader election
The etcdctl command is used to conduct leader elections in an etcd cluster. It makes sure that only one client can become leader at a time.
etcdctl --endpoints=$ENDPOINTS elect <election-name> [proposal]
Options
--endpoints : $ENDPOINTS
Address of each etcd cluster members.
election-namestring
A string identifier for the election. All participants competing for leadership must use the same election name.
leader-namestring
Proposal value of the new leader.
Example
Source and license
Documentation imported from pig.center · Upstream documentation
- Version
- 3.7
- License
- CC-BY-4.0
- Source revision
cd1a9d68fc9418f02dbf478ffac90f7891fdb53c8a4ac77c2d8284c7b12b6c3d