From d8f9e5c0b5e9bc1e6c4d3d97bf9bee0ebe193e89 Mon Sep 17 00:00:00 2001 From: xin gu <418294249@qq.com> Date: Thu, 21 Sep 2023 19:22:02 +0800 Subject: [PATCH] sync assign-pod-node pod-scheduling-readiness taint-and-toleratio Update assign-pod-node.md Update assign-pod-node.md --- .../scheduling-eviction/assign-pod-node.md | 24 ++++++++++++++++--- .../pod-scheduling-readiness.md | 4 ++-- .../taint-and-toleration.md | 2 +- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/content/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node.md b/content/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node.md index 0acdb4f9f5..f1a354cb0b 100644 --- a/content/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node.md +++ b/content/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node.md @@ -231,7 +231,7 @@ For example, consider the following Pod spec: 你可以使用 Pod 规约中的 `.spec.affinity.nodeAffinity` 字段来设置节点亲和性。 例如,考虑下面的 Pod 规约: -{{% code file="pods/pod-with-node-affinity.yaml" %}} +{{% code_sample file="pods/pod-with-node-affinity.yaml" %}} +#### 调度一组具有 Pod 间亲和性的 Pod {#scheduling-a-group-of-pods-with-inter-pod-affinity-to-themselves} + +如果当前正被调度的 Pod 在具有自我亲和性的 Pod 序列中排在第一个, +那么只要它满足其他所有的亲和性规则,它就可以被成功调度。 +这是通过以下方式确定的:确保集群中没有其他 Pod 与此 Pod 的命名空间和标签选择器匹配; +该 Pod 满足其自身定义的条件,并且选定的节点满足所指定的所有拓扑要求。 +这确保即使所有的 Pod 都配置了 Pod 间亲和性,也不会出现调度死锁的情况。 + 要通知调度程序此 Pod 已准备好进行调度,你可以通过重新应用修改后的清单来完全删除其 `schedulingGates`: -{{< codenew file="pods/pod-without-scheduling-gates.yaml" >}} +{{% code_sample file="pods/pod-without-scheduling-gates.yaml" %}} 这里是一个使用了容忍度的 Pod: -{{< codenew file="pods/pod-with-toleration.yaml" >}} +{{% code_sample file="pods/pod-with-toleration.yaml" %}}