Home › Kubernetes Tutorial › Labels and selectors
Labels and selectors
Group and find objects.
Labels are key-value tags on objects, such as app: web or env: prod. Selectors pick objects by their labels. Services, Deployments and many kubectl commands use them. Use -l to filter.
Example code
kubectl get pods -l app=web