Skip to main content
⎈K8sCalc
kubernetes

What is etcd?

A distributed key-value store used by Kubernetes to store all cluster state and configuration. etcd is the single source of truth for the entire cluster.

etcd explained

How it works. etcd is a strongly consistent key-value store that uses the Raft consensus algorithm. Every Kubernetes object — Deployments, Secrets, ConfigMaps, node status — is stored in etcd, and only the API server talks to it. A cluster of 3 or 5 etcd members tolerates the loss of 1 or 2 members respectively; with an even number you gain nothing.

In practice. Back it up with etcdctl snapshot save and test restores; losing etcd without a backup means losing the cluster's state. etcd is sensitive to disk latency, so control-plane nodes should have fast SSD/NVMe storage.

Common pitfalls.

  • ›Running out of the database quota (2 GiB by default): writes fail until you compact, defragment or raise --quota-backend-bytes.
  • ›Backups never restored in a test — they are only proven when a restore works.
  • ›Two control-plane nodes: no more fault tolerance than one, with more ways to lose quorum.

Related tool

K8s Cluster Cost

Calculate the monthly cost of running a self-managed Kubernetes cluster on Hetzner Cloud, Vultr, or DigitalOcean. Choose server types for control planes, workers, and load balancers with HA mode.

Related Calculators

Related Generators

Related Comparisons

Related Terms