This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.3.6.3. 删除污点和容限
您可以根据需要,从节点移除污点并从 pod 移除容限。您应首先将容限添加到 pod,然后将污点添加到节点,以避免在添加容限前从节点上移除 pod。
流程
移除污点和容限:
从节点移除污点:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc adm taint nodes <node-name> <key>-
$ oc adm taint nodes <node-name> <key>-
例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc adm taint nodes ip-10-0-132-248.ec2.internal key1-
$ oc adm taint nodes ip-10-0-132-248.ec2.internal key1-
输出示例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow node/ip-10-0-132-248.ec2.internal untainted
node/ip-10-0-132-248.ec2.internal untainted
要从 pod 移除某一容限,请编辑
Pod
规格来移除该容限:Copy to Clipboard Copied! Toggle word wrap Toggle overflow spec: tolerations: - key: "key2" operator: "Exists" effect: "NoExecute" tolerationSeconds: 3600
spec: tolerations: - key: "key2" operator: "Exists" effect: "NoExecute" tolerationSeconds: 3600