Skip to content

Commit f519670

Browse files
authored
Merge pull request #45958 from ydFu/taint-and-toleration
[zh]Update Taints and Tolerations Documentation
2 parents 297362d + 32b6000 commit f519670

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

content/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,23 @@ tolerations:
101101
```
102102
103103
<!--
104-
Here's an example of a pod that uses tolerations:
104+
The default Kubernetes scheduler takes taints and tolerations into account when
105+
selecting a node to run a particular Pod. However, if you manually specify the
106+
`.spec.nodeName` for a Pod, that action bypasses the scheduler; the Pod is then
107+
bound onto the node where you assigned it, even if there are `NoSchedule`
108+
taints on that node that you selected.
109+
If this happens and the node also has a `NoExecute` taint set, the kubelet will
110+
eject the Pod unless there is an appropriate tolerance set.
105111
-->
106-
这里是一个使用了容忍度的 Pod:
112+
默认的 Kubernetes 调度器在选择一个节点来运行特定的 Pod 时会考虑污点和容忍度。
113+
然而,如果你手动为一个 Pod 指定了 `.spec.nodeName`,那么选节点操作会绕过调度器;
114+
这个 Pod 将会绑定到你指定的节点上,即使你选择的节点上有 `NoSchedule` 的污点。
115+
如果这种情况发生,且节点上还设置了 `NoExecute` 的污点,kubelet 会将 Pod 驱逐出去,除非有适当的容忍度设置。
116+
117+
<!--
118+
Here's an example of a pod that has some tolerations defined:
119+
-->
120+
下面是一个定义了一些容忍度的 Pod 的例子:
107121

108122
{{% code_sample file="pods/pod-with-toleration.yaml" %}}
109123

0 commit comments

Comments
 (0)