gpt4 book ai didi

kubernetes - 具有容忍度的 Pod 被调度到没有污点的节点

转载 作者:行者123 更新时间:2023-12-02 12:16:59 25 4
gpt4 key购买 nike

我有这个设置的 pod:

Node-Selectors:  <none>
Tolerations: node.kubernetes.io/memory-pressure:NoSchedule
node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 60s
role_va

pod 被调度到这个节点:

Labels:             balancer=true
beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
cpu_avx2=true
cpu_avx512f=true
kubernetes.io/hostname=p20b-sr3-r5-k8s-node4
master=true
worker=true
Annotations: node.alpha.kubernetes.io/ttl=0
volumes.kubernetes.io/controller-managed-attach-detach=true
Taints: <none>

请帮我理解为什么。如果我没记错的话,具有容忍度“role_va”的 pod 必须调度到具有此污点的节点。在我的例子中,节点没有这个污点,但 pod 无论如何都被安排到这个节点中。为什么?

最佳答案

您的问题的答案包含在 Kubernetes 文档的 Taints and Tolerations 定义中:Taints and Tolerations

The way Kubernetes processes multiple taints and tolerations is like a filter: start with all of a node’s taints, then ignore the ones for which the pod has a matching toleration; the remaining un-ignored taints have the indicated effects on the pod

这意味着如果节点没有有污点,它将接受每个 pod,无论它们中定义的容忍度如何。

关于kubernetes - 具有容忍度的 Pod 被调度到没有污点的节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55413419/

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