Labels are a central concept in Kubernetes
All resources can have labels…
… and - as a matter of fact - should have labels
Labels provide context for resources
Labels are used for selection (next section)
Changing labels does not cause pod updates
Labels are added in metadata
apiVersion: v1
kind: Pod
metadata:
labels:
app: my-app
tier: frontend
Start multiple pods with labels
Filter pods by label(s)
Format: [<prefix>/]<name>: <value>
Optional prefix must be a fully qualified sub-domain
No long than 63 characters
Values of labels must match ^[a-z0-9_\-]+$
app: my-app
inmylab.de/component: database