Labels ΒΆ
Labels are user-defined key-value pairs that you can attach to your resources to organize and categorize them however you make sense of them.
A label might describe ownership, a project, an environment grouping, or anything else that helps you find and group related resources. Nais does not assign any special meaning to your labels β they are yours to use as you see fit.
How labels work on Nais ΒΆ
Labels on Nais are regular Kubernetes labels with one requirement: the key must use the labels.nais.io/ prefix.
labels.nais.io/<key>: <value>This prefix keeps your own labels clearly separated from the labels that Nais manage internally, so the two never collide.
When you set a label on a resource, Nais keeps it verbatim and propagates it to the underlying Kubernetes resources that the resource owns. For a workload, this means the label is also applied to the resources Nais generates on your behalf.
Where you can use labels ΒΆ
You can define labels on any of the Kubernetes resources that Nais supports, under metadata.labels.
In addition, you can add and edit labels directly from Nais Console for:
Related pages ΒΆ
π― Add labels to your resources
π Label reference