gpt4 book ai didi

kubernetes - Kubernetes 模块如何与 etcd 通信?

转载 作者:行者123 更新时间:2023-12-04 00:59:34 24 4
gpt4 key购买 nike

我知道 Kubernetes 有 5 个模块:kube-apiserver, kube-controller-manager, kube-scheduler在主节点和 kubelet, kube-proxy在 Minion 节点中。他们如何与 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.



但是谷歌的一些博客和架构图认为 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 通信。

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

关于kubernetes - Kubernetes 模块如何与 etcd 通信?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39102749/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com