Label selector tester
Check which pods a selector matches, and why the others do not. Accepts kubectl --show-labels output.
Runs locally. Nothing you paste leaves this tab.
kubectl
YAML
Selector syntax
app=weborapp==web: label equals the value.tier!=db: label is notdb, or the label is missing.env in (prod,staging)andenv notin (dev): set-based.notinalso matches objects without the label.release/!release: the label exists / does not exist.
All requirements must match (logical AND). There is no OR: use in (a,b) for one key. Service spec.selector only supports equality, while Deployments, PDBs and NetworkPolicies accept matchExpressions.
kubectl get pods -l 'app=api,env in (prod,staging),!canary' --show-labels