What is etcd
etcd is an open-source, distributed, value-based framework for shared storage, service discovery, and coordination in distributed systems or clusters of workstations. etcd is an open-source, distributed key-value store that stores vital system data. It handles Kubernetes-specific configuration, state, and metadata.
What is Kubernetes etcd
Kubernetes’ distributed, consistent key-value store, etcd, is its core, highly available database. Cluster configuration, status, and metadata are stored there as the control plane’s source of truth. Kubernetes needs it.
You can also read What is Container Orchestration in Kubernetes?
Role in Kubernetes

- Source of Truth: It holds sensitive data like Secrets as well as node status and Pod manifests.
- Consistency: Uses Raft consensus to ensure equal data access across cluster nodes.
- Control Plane Interaction: Components and users can only connect to etcd via the Kubernetes API server.
- The “Watch” Function: Kubernetes keeps track of data changes using etcd’s watch API. The control plane starts a reaction to bring the cluster’s real state and the ideal state recorded in etcd into harmony.
- High Availability: For redundancy, it is frequently set up as an external or stacked cluster.
Key Considerations:
- Storage Limit: Usually built to contain only a few gigabytes, it is optimized for smaller data sets.
- Performance: Able to manage about one write per second.
- Security: TLS/SSL authentication is supported.
- Backup/Restore: A crucial administrative duty to avoid data loss is backup and restore.
You can also read What is Kubernetes Architecture, Features of K8s
How it Works
The Raft consensus mechanism is used by etcd to preserve consistency over a cluster.
- Leader Election: The cluster chooses a leader to manage client requests.
- Quorum-Based Writes: To “write” successfully, the leader must verify a majority (quorum) of follower nodes have saved the request.
- Failover: To ensure ongoing availability as long as most nodes are running, followers elect a successor if a leader fails.
Operational Requirements

- High Availability (HA): To prevent “split-brain” situations and guarantee that the cluster can still come to a consensus in the event that a node fails, etcd should operate in production with an odd number of members, usually three or five.
- Resource Sensitivity: Disk and network I/O latency have a significant impact on etcd. Using SSDs is highly advised to preserve stability and performance because they store all data on disk.
- Security: Root powers over the cluster are like access to etc.d. Encrypting data at rest, segregating the etcd cluster from other workloads, and using TLS certificates for all communications are essential security measures.
You can also read What is the Importance of Kubernetes & Why Kubernetes?
Management Tools
To communicate with etcd, two main command-line programs are utilized:
- etcdctl: The main client used for routine network tasks like taking snapshots, managing keys, and assessing cluster health.
- etcdutl: An administration tool for performing direct operations on data files, such restoring a database from a backup or confirming snapshots.
You can also read What is the Control Plane in Kubernetes?
Does Kubernetes still use etcd?
Yes, Kubernetes still uses etcd, a reliable, distributed key-value store for cluster state data like configuration, secrets, and metadata. The cluster’s “single source of truth” is the kube-apiserver, which reads and writes this data directly with etcd. High consistency (based on Raft consensus technique) ensures cluster reliability. Although alternatives have been considered, etcd is still the most used Kubernetes backend.
What is etcd in Kubernetes?
Kubernetes’ core data store is etcd, a distributed, consistent key-value store. It stores configuration, status, metadata, secrets, and service discovery data for the cluster. API servers and other Kubernetes components read and write cluster state via etcd. High availability and consistency are achieved utilizing the Raft consensus mechanism. It’s important to secure, backup, and monitor etcd because it saves crucial data. The “source of truth” for a Kubernetes cluster, etcd coordinates and manages all resources and actions.
