gpt4 book ai didi

kubernetes - daemonset 会始终部署到所有节点吗?

转载 作者:行者123 更新时间:2023-12-02 11:36:58 24 4
gpt4 key购买 nike

我想知道 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/

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