Edit Node Taints
This section describes how to edit node taints.
A taint is a label created by a user on a node, used in conjunction with tolerations created on pods. When a node has a taint, depending on the set taint effect, all pods lacking a toleration that matches the taint will be prevented from being scheduled onto the node or will be scheduled onto the node as little as possible.
A taint consists of three parts: a key, a value, and an effect. A pod’s toleration must match the taint’s key, value, and effect for the pod to be unaffected by the taint.
| Note |
|---|
The KubeSphere web console currently does not support editing pod tolerations. Therefore, by default, node taints are effective for all pods. |
Prerequisites
You need to join a cluster and have the Node Management permission in the cluster. For more information, see Cluster Members and Cluster Roles.
Steps
-
Log in to the KubeSphere web console with a user who has Node Management permissions and enter your cluster.
-
In the left navigation pane, select Nodes > Cluster Nodes to open the node list.
-
Select the checkbox to the left of the node you want to operate on, then click Edit Taints above the node list.
-
In the Edit Taints dialog box, set the taint’s key, value, and effect, then click OK.
You can choose one of the following effects for a taint:
Taint Effect Description Prevent Scheduling
Pods lacking a toleration that matches the taint will be prevented from being scheduled onto the node. Pods already running on the node are not affected.
Schedule as Little as Possible
Pods lacking a toleration that matches the taint will be scheduled onto the node as little as possible. Pods already running on the node are not affected.
Prevent Scheduling and Evict Existing Pods
Pods lacking a toleration that matches the taint will be prevented from being scheduled onto the node. Pods already running on the node that lack a matching toleration will be evicted immediately.
Note -
Click Add Taint to set multiple taints for a node.
-
If you are editing taints for multiple nodes simultaneously, you can set common taints for all selected nodes as well as individual taints for each node.
-