Merge pull request #45384 from network-charles/network-charles-patch-1

Update Taints and Tolerations Documentation
This commit is contained in:
Kubernetes Prow Robot 2024-04-21 17:59:25 -07:00 committed by GitHub
commit 0faafb099b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -62,7 +62,15 @@ tolerations:
effect: "NoSchedule"
```
Here's an example of a pod that uses tolerations:
The default Kubernetes scheduler takes taints and tolerations into account when
selecting a node to run a particular Pod. However, if you manually specify the
`.spec.nodeName` for a Pod, that action bypasses the scheduler; the Pod is then
bound onto the node where you assigned it, even if there are `NoSchedule`
taints on that node that you selected.
If this happens and the node also has a `NoExecute` taint set, the kubelet will
eject the Pod unless there is an appropriate tolerance set.
Here's an example of a pod that has some tolerations defined:
{{% code_sample file="pods/pod-with-toleration.yaml" %}}