Labels, Selectors, and Annotations in Kubernetes
From the Kubernetes Essentials cheat sheet ยท Labels and Metadata ยท verified Aug 2026
Labels, Selectors, and Annotations
Attach queryable labels and descriptive annotations.
bash
kubectl label pod web env=prod
kubectl get pods -l env=prod๐ Selectors connect controllers and Services to Pods
๐ก Use annotations for non-identifying metadata
๐ Set-based selectors support in and notin
โ ๏ธ Changing selector labels can disconnect resources
labelsselectorsannotations
Continue with Kubernetes Essentials
Save the full cheat sheet or work through every related task.