Taint和Toleration(污点和容忍)
Taint 和 toleration 相互配合,可以用来避免 pod 被分配到不合适的节点上。每个节点上都可以应用一个或多个 taint ,这表示对于那些不能容忍这些 taint 的 pod,是不会被该节点接受的。如果将 toleration 应用于 pod 上,则表示这些 pod 可以(但不要求)被调度到具有相应 taint 的节点上。
为 node1 设置 taint:
查看 node1 上的 taint:
- 的值可以为
NoSchedule
、 或NoExecute
。
详细使用方法请参考官方文档。