Labels

Using Labels to Organize SKS Clusters and Nodepools

SKS clusters and nodepools support labels similarly to Compute instance labels. Labels can be associated with clusters and nodepools to help classify and organize them.

The --label key=value and --nodepool-label options can be passed to the exo compute sks create command to add labels to your clusters or nodepools. The sks nodepool add command also supports --label.

The labels options can be repeated to add multiple labels to an entity.

Labeling Rules for the kubernetes.io Namespace

When using labels in the kubernetes.io namespace, you must follow strict naming rules. Labels must either:

  1. Start with an allowed prefix:
  • kubelet.kubernetes.io
  • node.kubernetes.io

OR

  1. Be part of the explicitly allowed set:
  • beta.kubernetes.io/arch
  • beta.kubernetes.io/instance-type
  • beta.kubernetes.io/os
  • failure-domain.beta.kubernetes.io/region
  • failure-domain.beta.kubernetes.io/zone
  • kubernetes.io/arch
  • kubernetes.io/hostname
  • kubernetes.io/os
  • node.kubernetes.io/instance-type
  • topology.kubernetes.io/region
  • topology.kubernetes.io/zone

If you need another label in the kubernetes.io namespace, you will need to set it after the nodes are registered with:

kubectl label node NODE-NAME unallowed.kubernetes.io/prefix=true