☑️ Ensure workload has valid label values

Labels are nothing more than custom key-value pairs that are attached to objects and are used to describe and manage different Kubernetes resources. If the labels do not follow Kubernetes label syntax requirements (see links below), they will not be applied properly.

FYI

Labels' keys and values are case-sensitive!

Targeted resources by this rule (types of kind): Deployment / Pod / DaemonSet / StatefulSet / ReplicaSet / CronJob / Job

Enabled by default? True

Policy as code identifier: WORKLOAD_INVALID_LABELS_VALUE

This rule will fail

If one of the keys under labels contains an invalid value

YAML

Rule output in the CLI

Terminal

How to fix this failure

YAML

Read more