Add labels to your resources ΒΆ
This guide shows you how to add labels to your resources, either through your manifest or through Nais Console.
Add labels in your manifest ΒΆ
Add your labels under metadata.labels, using the labels.nais.io/ prefix:
yaml
apiVersion: nais.io/v1alpha1
kind: Application
metadata:
name: <MY-APP>
namespace: <MY-TEAM>
labels:
labels.nais.io/team-area: payments
labels.nais.io/sensitive: "true"
spec:
...The labels are kept verbatim and propagated to the Kubernetes resources that your workload owns.
Add labels in Nais Console ΒΆ
You can add and edit labels from Console for Valkey, OpenSearch, Config, and Secret.
- Open Nais Console and navigate to the resource you want to label.
- Find the Labels section in the sidebar and click the edit icon.
- Enter a key and a value. The
labels.nais.io/prefix is added automatically. - Click Add label to add more labels.
- Click Save.
Related pages ΒΆ
π Label reference