Kubernetes 模块如何与 etcd 通信?

How do Kubernetes modules communicate with etcd?

我知道 Kubernetes 有 5 个模块:Master 节点中的 kube-apiserver, kube-controller-manager, kube-scheduler 和 Minion 节点中的 kubelet, kube-proxy。他们如何与 etcd 通信?都会在etcd中查询或设置数据吗?或者只有他们中的一些人这样做?

The docs表示etcd只能被kube-apiserver访问:

Access Control: give only kube-apiserver read/write access to etcd. You do not want apiserver’s etcd exposed to every node in your cluster (or worse, to the internet at large), because access to etcd is equivalent to root in your cluster.

但是 Google 的一些博客和架构人物认为 etcd 也被其他模块访问,就像 this blog 所说的:

The etcd services are the communications bus for the Kubernetes cluster. The app-service posts cluster state changes to the etcd database in response to commands and queries. The kubelets read the contents of the etcd database and act on any changes they detect.

那么哪个说的对呢?谢谢!

您链接到的文档是正确的——只有 apiserver 直接与 etcd 通信。其余系统组件通过 apiserver 间接 与 etcd 通信。

另请注意,您链接到的博客 post 大约只有 2 年历史,当时可能是准确的,但您链接到的文档是针对当前 Kubernetes 版本的。