Pcornel
Containers · Kubernetes Architecture

etcd

Cheat sheet · https://pcornel.dk/topic.php?topic=6141

Back to the Topic

Answer

etcd is the consistent key-value store holding all Kubernetes state, run as a Raft cluster (usually 3 or 5 members).

Remember

Quorum needs a majority of members. Back up with etcdctl snapshot save regularly. Slow disks (fsync latency) make the whole cluster slow.

First checks

  • etcdctl endpoint health --cluster — first check for this topic
  • kubectl get pods -o wide — pods, status, node, IP
  • kubectl describe pod <pod> — events and conditions
  • kubectl logs <pod> [-c <c>] [--previous] — container logs (incl. previous crash)
  • kubectl get events --sort-by=.lastTimestamp — recent cluster events

Verify in this order

API server → etcd leader → Raft replication → committed

Where it usually breaks

An even member count adds no fault tolerance.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6141

Confirmation

Confirm action

Continue?