Hands-On Kubernetes on Windows
上QQ阅读APP看书,第一时间看更新

etcd cluster

To persist the cluster state, Kubernetes uses etcd a distributed, reliable key-value store that utilizes the Raft distributed consensus algorithm in order to provide sequential consistency. The etcd cluster is the most important part of the control plane this is the source of truth for the whole cluster, both for the current state and the desired state of the cluster.

Generally, single-node etcd clusters are only recommended for testing purposes. For production scenarios, you should always consider running at least a five-member cluster (with an odd number of members) in order to provide sufficient fault tolerance. 

When choosing an  etcd cluster deployment topology, you can consider either a stacked etcd topology or an external etcd topology. A stacked etcd topology consists of one etcd member per Kubernetes master instance, whereas an external etcd topology utilizes an etcd cluster deployed separately from Kubernetes and is available via a load balancer. You can find out more about these topologies in the official documentation: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/ha-topology/.

The watch protocol that's exposed by etcd is also a core functionality for the watch API in Kubernetes, which is provided by kube-apiserver for other components.