On the other hand, annotations are not limited on characters used for labels.
Valid label keys have two segments: an optional prefix and name, separated by a slash `/`. The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character `[a-z0-9A-Z]` with dashes `-`, underscores `_`, dots `.`, and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots `.`, not longer than 253 characters in total, followed by a slash `/`.
Valid label values must be 63 characters or less and must be empty or begin and end with an alphanumeric character `[a-z0-9A-Z]` with dashes `-`, underscores `_`, dots `.`, and alphanumerics between.
## Labels in action
Apply the pod `06-label-annotation/01-simple-pod.yml`. It is the same as `05-pods/01-simple-pod.yml` but with 2 labels:
*`env`: `production`
*`tier`: `backend`
Apply the pod `06-label-annotation/02-nginx.yml`. It is a simple nginx with 2 labels:
*`env`: `production`
*`tier`: `frontend`
Let's list all the pods that are in the `env=production`: