# Error from server: etcdserver: request timed out, possible leader election

- **ID:** `kubernetes/etcd-leader-election-timeout`
- **Domain:** kubernetes
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 75%

## Root Cause

The etcd cluster is experiencing a leader election or network partition, causing API server requests to time out.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| etcd 3.5 | active | — | — |
| kubernetes 1.27 | active | — | — |
| kubernetes 1.28 | active | — | — |

## Workarounds

1. **Run `etcdctl endpoint health --cluster` and `etcdctl endpoint status --cluster -w table` to identify unhealthy members. If a leader is missing, ensure a majority of etcd nodes are reachable.** (80% success)
   ```
   Run `etcdctl endpoint health --cluster` and `etcdctl endpoint status --cluster -w table` to identify unhealthy members. If a leader is missing, ensure a majority of etcd nodes are reachable.
   ```
2. **Use `ETCDCTL_API=3 etcdctl snapshot restore /path/to/backup.db --data-dir /var/lib/etcd` on a new etcd instance, then restart the API server pointing to the restored etcd.** (70% success)
   ```
   Use `ETCDCTL_API=3 etcdctl snapshot restore /path/to/backup.db --data-dir /var/lib/etcd` on a new etcd instance, then restart the API server pointing to the restored etcd.
   ```

## Dead Ends

- **** — The API server is not the root cause; restarting it won't fix etcd instability. (90% fail)
- **** — Longer timeouts may mask the issue but don't address the underlying etcd cluster problem. (70% fail)
- **** — If the cluster is in a leader election, rebooting nodes can worsen the situation and cause data loss. (60% fail)
