--- title: How to conduct leader election in etcd cluster description: Steps for conducting a leader election through the etcdctl client weight: 900 categories: [Task] upstream_link: "https://github.com/etcd-io/website/blob/824597935df6e95992ef61c07e3222f4f796ca6c/content/en/docs/v3.7/tasks/operator/how-to-conduct-elections.md" aliases: [/etcd/tasks/operator/how-to-conduct-elections/] --- ## Prerequisites - Ensure [`etcd`](/docs/etcd/install/) and [`etcdctl`](/docs/etcd/install/) is installed. - Check for active etcd cluster. ## 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 [proposal]` ```shell etcdctl --endpoints=$ENDPOINTS elect election-name p1 ``` ### Options - `--endpoints : $ENDPOINTS` Address of each etcd cluster members. - `election-name` string A string identifier for the election. All participants competing for leadership must use the same election name. - `leader-name` string Proposal value of the new leader. ### Example ```shell ./etcdctl elect my-election proposal1 my-election/694d99fafea88404 proposal1 another election: ./etcdctl elect new-election proposal1 new-election/694d99fafea8840f proposal1 ```