etcd
A distributed key-value store for critical config data.
etcd is a distributed key-value store that uses the Raft consensus algorithm to keep a strongly-consistent cluster state replicated across an odd number of nodes. Reads and writes go through a leader; if the leader fails, the remaining members elect a new one. Each key-value write produces a new revision, and clients can watch ranges of keys for changes, which makes etcd a good fit for leader election, distributed locking, and coordinating work across stateful services.
Kubernetes uses etcd as its sole datastore: every Pod, Service, Secret, ConfigMap, and CRD lives there. The behaviour of a Kubernetes cluster is, in a real sense, the behaviour of its etcd cluster. CoreOS originally built etcd around 2013 to support fleet, their cluster manager, and donated the project to the Cloud Native Computing Foundation in 2018.
Beyond Kubernetes, etcd sees use as a coordination primitive in distributed databases (TiKV, CockroachDB used etcd in early versions), service-discovery layers, and bespoke distributed systems where strong consistency matters more than availability under partition. The project's long-term health and operational practices (runbook, disaster recovery, version skew handling) have improved considerably since the early days, in part because of how heavily Kubernetes leans on it.
Install
Debian/Ubuntu: sudo apt install etcd-server Fedora/RHEL: sudo dnf install etcd Arch (AUR): yay -S etcd
Authors
- CoreOS (origin)
- Cloud Native Computing Foundation