我想知道 kubernetes 中的守护进程是否会始终部署到所有节点。
我的困惑来自以下对 daemonset 的描述
A DaemonSet makes sure that all or some kubernetes Nodes run a copy of a Pod.
“或某些”部分,意味着存在某些节点不会运行 pod 的情况。对于我的用例,所有节点都运行一个实例很重要。在什么情况下节点不会运行 pod 的实例,即使它被部署为守护进程?
最佳答案
这取决于选择的节点目标。
If you specify a .spec.template.spec.nodeSelector, then the DaemonSet controller will create Pods on nodes which match that node selector. Likewise if you specify a .spec.template.spec.affinity, then DaemonSet controller will create Pods on nodes which match that node affinity. If you do not specify either, then the DaemonSet controller will create Pods on all nodes.DaemonSet
另外我会检查 taint and toleration对于 Daemonset。
关于kubernetes - daemonset 会始终部署到所有节点吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57490921/