> For the complete documentation index, see [llms.txt](https://bohans.gitbook.io/devops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bohans.gitbook.io/devops/kubernetes/ji-chu-zhi-shi/kubernetes-diao-du/taint-he-toleration/rong-ren-he-wu-dian-de-ji-ben-gai-nian/wu-dian-de-tian-jia-yu-shan-chu.md).

# 污点的添加与删除

给节点增加一个Taint直接使用<mark style="color:blue;">**kubectl taint**</mark>命令即可，比如给 node01 节点设置一个Taint：

```properties
 $ kubectl taint nodes node01 key1=value1:NoSchedule
node/node01 tainted
```

给节点 node1 增加一个污点，它的键名是 key1，键值是 value1，效果是 NoSchedule。这表示只有拥有和这个污点相匹配的容忍度的 Pod 才能够被分配到 node01 这个节点。

若要移除上述命令所添加的污点，可以执行：

```properties
$ kubectl taint nodes node01 key1=value1:NoSchedule-
node/node01 untainted
```
