Node labels and taints give you precise control over how Kubernetes schedules pods across your cluster. Labels classify nodes and act as selectors for workload placement. Taints repel pods from nodes — only pods with a matching toleration can be scheduled to a tainted node.
A common use case: GPU nodes are expensive. Add a taint to reserve them exclusively for GPU workloads, so general-purpose pods are never scheduled there by default.
For background on labels and taints, see Labels and selectors and Taints and tolerations in the Kubernetes documentation.
Taint effects
Each taint has an effect that determines how Kubernetes handles pods that lack a matching toleration.
| Effect | Behavior |
|---|---|
| NoSchedule | The system does not schedule pods to the node. |
| NoExecute | The system does not schedule pods to the node, and pods that do not have matching tolerations are evicted from the node. |
| PreferNoSchedule | The system attempts to avoid scheduling pods that do not have matching tolerations to the node. This effect does not specify a hard requirement. |
Add and manage node labels
Labels identify and classify nodes, and serve as selectors when scheduling workloads to specific nodes.
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, choose Nodes > Nodes.
Click Manage Labels and Taints. On the Labels tab, select the target nodes and click Add Label. In the Add dialog box, set Name and Value, then confirm.
After the label is added, it appears in the Labels column for the node. From that column, you can:
Click a label to filter nodes by that label.
Click the
icon next to a label to delete it.
Specific Kubernetes-native labels cannot be deleted. If you delete such a label, the system automatically re-adds it to the node.
Add and manage node taints
Use taints to restrict which pods can run on a node. Typical scenarios:
Dedicated nodes: Reserve a group of nodes for specific users or workloads.
Hardware specialization: Ensure only pods that require GPU resources are scheduled to GPU nodes.
Pod eviction: Add a
NoExecutetaint to evict all pods from a node. To retain a specific pod, add a matchingNoExecutetoleration to that pod.
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, choose Nodes > Nodes.
Click Manage Labels and Taints. On the Taints tab, select the target nodes and click Add Taint. In the Add dialog box, set Name, Value, and Effect, then confirm.
Parameter Constraints Name 1–63 characters. Allowed characters: letters, digits, hyphens ( -), underscores (_), and periods (.). Must start and end with a letter or digit. To use a prefixed key, the prefix must be a DNS subdomain name (DNS labels separated by periods, up to 253 characters), followed by a forward slash (/).Value Optional. Up to 63 characters. Allowed characters: letters, digits, hyphens ( -), underscores (_), and periods (.). Must start and end with a letter or digit if not blank.Effect One of NoSchedule,NoExecute, orPreferNoSchedule. See Taint effects.
After the taint is added, it appears in the Taints column for the node. From that column, you can:
Click a taint to filter nodes by that taint.
Click the
icon next to a taint to delete it.
What's next
To configure labels and taints across all nodes in a node pool at once, see Create and manage a node pool.
To schedule pods to specific nodes using labels or the
nodeSelectorfield, see Schedule pods to specific nodes.