Label reference ΒΆ

Labels are user-defined key-value pairs used to organize and categorize your resources. See the labels explanation for background.

Format ΒΆ

A label consists of a key and a value:

Plaintext
PartDescription
labels.nais.io/Required prefix. It is the only constraint Nais adds on top of the standard Kubernetes label rules.
<key>Your label name. Must follow the Kubernetes label syntax.
<value>Your label value. Must follow the Kubernetes label syntax.

Behavior ΒΆ

  • Labels are kept verbatim β€” Nais does not rewrite or strip them.
  • Labels are propagated to the underlying Kubernetes resources that the resource owns.
  • Labels carry no special meaning to Nais. They are only used for your own organization.

Setting labels ΒΆ

Labels are defined under metadata.labels for any Kubernetes resource that Nais supports:

yaml

Labels can also be added and edited from Nais Console for Valkey, OpenSearch, Config, and Secret.

🎯 Add labels to your resources

πŸ’‘ Learn more about labels