This chapter covers
- Comparing Etcd v3 with etcd v2
- Looking at a "watch" in Kubernetes
- Exploring the importance of Strict consistency in Kubernetes
- Loadbalancing against ETCD nodes
- Looking at Etcd’s security model in the Kubernetes context
As discussed in chapter 11, Etcd is a key value store with strong consistency guarantees, similar to Zookeeper (which is used for popular technologies like HBase and Kafka).
A Kubernetes cluster at its core consists of:
- the Kubelet
- the Scheduler
- the Kubernetes Controller Manager
- the APIServer
The former components all speak to one another by updating the APIServer. For example, if the Scheduler wants to run a pod on a specific node, it does so by modifying the Pod’s definition in the APIServer. If, during the process of starting a Pod the Kubelet needs to broadcast an event, it does so also by sending an APIServer message.
The Scheduler, Kubelet, and ControllerMAnager all intermediate communication through the APIServer, which makes them strongly decoupled. For example, the Scheduler doesn’t know how a Kubelet runs Pods, and the Kubelet doesn’t know how the APISErver schedules Pods.