Pregunta de Container Orchestration #019e3a4f
Which key-value store is used to persist Kubernetes cluster data?
etcd
ZooKeeper
ControlPlaneStore
Redis
Explicación Oficial / Explicaciones de la Comunidad
The key-value store used to persist Kubernetes cluster data is etcd. etcd is a distributed, reliable key-value store that is used by Kubernetes to store all cluster data, including configuration, state, and metadata. It is based on the Raft consensus algorithm, ensuring consistency and high availability.
How it Works
Kubernetes uses etcd as its backing store for all cluster data. When you create, update, or delete Kubernetes objects (such as pods, services, deployments), the API server writes these changes to etcd. etcd then replicates the data across multiple nodes to ensure durability and fault tolerance. The API server is the only component that communicates directly with etcd, and all other components (like the scheduler and controller manager) interact with the API server.
Why etcd is Correct
- etcd is the official and only supported key-value store for Kubernetes. It is designed for distributed systems and provides strong consistency guarantees.
- Kubernetes relies on etcd's watch functionality to detect changes in cluster state and react accordingly.
Why Other Options are Incorrect
- ZooKeeper is a distributed coordination service used by other systems like Apache Kafka and Hadoop, but it is not used by Kubernetes for persisting cluster data. Kubernetes has its own abstraction layer and does not depend on ZooKeeper.
- ControlPlaneStore is not a real technology. It might be confused with the concept of a control plane store, but the actual implementation is etcd.
- Redis is an in-memory data structure store often used for caching and session management. While it can be used as a key-value store, it is not designed for the strong consistency and durability requirements of Kubernetes cluster state. Kubernetes does not use Redis for this purpose.
In summary, etcd is the correct and only key-value store used by Kubernetes to persist cluster data, ensuring reliability and consistency across the cluster.