How do I force a Vault server to step down as leader?
During the course of Vault operations you may have need for a Vault leader node to stop leadership, most typically for system maintenance.
The vault operator step-down
forces the active Vault node within an HA cluster to step down from active duty. When executed against a non-active node, i.e. a standby or performance standby node, the request will be forwarded to the active node.
While the affected node will have a delay before attempting to acquire the leader lock again, if no other Vault nodes acquire the lock beforehand, it is possible for the same node to re-acquire the lock and become active again.
To perform from the cli issue the following command:
$ vault operator step-down
Success! Stepped down: http://127.0.0.1:8200
Resources:
-
API: https://www.vaultproject.io/docs/commands/operator/step-down