Skip to main content

Kubernetes annotations and labels

This topic describes how to use annotations and labels to select objects you defined in your manifests.

Annotations

To see annotations in action, see Deploy Manifests Separately using Apply Step and Ignore a Manifest. Annotations are a way to pass additional metadata for resources to Harness. For a description of Annotations, go to Annotations from Kubernetes.

The following Annotations can be put on resource specifications in the Harness Service Manifests section.

AnnotationValueUsage
harness.io/skip-versioning`"true""false"`
harness.io/direct-apply`"true""false"`
harness.io/primary-service`"true""false"`
harness.io/stage-service`"true""false"`

Labels

The following labels are applied by Harness during deployment.

LabelValueUsage
harness.io/release-namerelease nameApplied on pods. Harness uses a release name for tracking releases, rollback, etc. You can supply a release name in an Environment's Infrastructure Definition Release Name field.
harness.io/trackcanary | stableApplied on pods in a Canary deployment.
harness.io/colorblue | greenApplied on pods in a Blue/Green deployment.

Next steps