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
<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.

Hidden labels ΒΆ

Nais Console and the Nais API surface all labels on a resource, except for the following internal labels, which are hidden:

Label keyMatch
appExact match
teamExact match
*nais.io/*Any key containing the substring nais.io/

Hidden labels remain present on the underlying Kubernetes resources.

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