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.

Selector syntax

  • app=web or app==web: label equals the value.
  • tier!=db: label is not db, or the label is missing.
  • env in (prod,staging) and env notin (dev): set-based. notin also 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

View this tool’s source · Report a problem

Support on Ko-fi