Help Center/ Ubiquitous Cloud Native Service/ User Guide/ Cluster Federation/ Adding Labels and Taints to a Cluster
Updated on 2024-06-17 GMT+08:00

Adding Labels and Taints to a Cluster

UCS allows you to add different labels to clusters to define clusters. By using these cluster labels, you can quickly understand the characteristics of each cluster. Taints enable a cluster to repel specific pods to prevent these pods from being scheduled to the cluster, achieving reasonable allocation of workloads on clusters.

Labels

You can add different labels to clusters to classify and manage clusters.

Taints

Taints are in the format of Key=Value:Effect. Key and Value are the labels of a taint. Value can be empty. Effect is used to describe the effect of taints. The following two options are supported for Effect:
  • NoSchedule: No pod will be able to schedule onto the cluster unless it has a matching toleration, but existing pods will not be evicted from the cluster.
  • NoExecute: Pods that cannot tolerate this taint cannot be scheduled onto the cluster, and existing pods will be evicted from the cluster.

Managing Cluster Labels and Taints

  1. Log in to the UCS console.
  2. Click the name of the fleet where the target cluster is located. In the navigation pane, choose Container Clusters, locate the target cluster, and click in the upper right corner to go to the Manage Labels and Taints page.

    Figure 1 Label and taint management

  3. Click to add a node label or taint. You can add a maximum of 10 operations at a time.

    Figure 2 Adding labels or taints
    • Choose Add or Delete.
    • Set the operation object to Kubernetes Label or Taint.
    • Specify Key and Value.
    • If you choose Taint, select a taint effect. For details, see Taints.

  4. Click OK.