Using cluster labels to manage clusters

Cluster labels are useful for multi-cluster management across your clusters, allowing you to add metadata relevant to your clusters. For example, you can label subsets clusters based on their purpose, like dev, staging, and prod.

To make individual or bulk changes to the labels associated with your clusters, perform the following steps:

Console

  1. Visit the clusters menu in Cloud Console.

    Visit the clusters menu

  2. Select one or more clusters by checking the box to the left of the cluster.

  3. Click Show Info Panel.

  4. Add or modify existing labels.

gcloud

gcloud container hub memberships update [MEMBER] \
 --update-labels=:[KEY]=:[VALUE]

where:

  • [MEMBER] is name of the cluster to edit
  • [KEY=VALUE] is a label to update. If a label exists its value is modified, otherwise a new label is created..