# Election: leader election lost

- **ID:** `kubernetes/leader-election-lost`
- **Domain:** kubernetes
- **Category:** system_error
- **Error Code:** `K8S-LEADER-001`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A controller or operator pod lost its lease lock due to network partition, pod restart, or etcd timeout, causing a temporary leadership gap.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| kubernetes 1.23 | active | — | — |
| kubernetes 1.24 | active | — | — |
| kubernetes 1.25 | active | — | — |
| kubernetes 1.28 | active | — | — |

## Workarounds

1. **Scale down the controller deployment to 0, wait 30 seconds, then scale back up to 1 to force a clean leader election.** (85% success)
   ```
   Scale down the controller deployment to 0, wait 30 seconds, then scale back up to 1 to force a clean leader election.
   ```
2. **Check network policies or firewall rules that may block communication between controller replicas on port 2380 (etcd peer port).** (75% success)
   ```
   Check network policies or firewall rules that may block communication between controller replicas on port 2380 (etcd peer port).
   ```

## Dead Ends

- **Restart all replicas of the controller simultaneously.** — Restarting all replicas at once can cause a prolonged leader election storm, making the problem worse. (65% fail)
- **Delete the lease object in etcd manually.** — Manually deleting the lease may cause data inconsistency and is not recommended; the leader election mechanism should self-heal. (80% fail)
