concept

Labels, selectors and annotations

Labels are selectable key/value strings; annotations hold non-selector metadata. Combine requirements with AND and explicitly require key existence when negative filters must exclude missing keys.

Formal Syntax & Structure

kubernetes syntaxkubernetes
Labels, selectors and annotations

Working Example

Example Snippetkubernetes
kubectl --kubeconfig ./lab.kubeconfig --context bytemind-lab -n book-lab get pods -l 'app=catalog,track,track notin (stable)'
Kubernetes Reference