Kubernetes Label Selector Builder

Interactively construct equality-based and set-based Kubernetes label selectors for CLI filtering (`kubectl get -l`) and YAML manifest selectors (`matchLabels` / `matchExpressions`).

Ready

Selector Reference Guidelines

1. Equality-Based Operators

Allows filtering by key-value pairs using operators like =, == (equality) or != (inequality).

2. Set-Based Operators

Supports filtering across sets of values using in, notin, and key existence checks like exists / doesnotexist.

Frequently Asked Questions (FAQ)

matchLabels is a map of {key,value} pairs equivalent to equality-based equality. matchExpressions is a list of more advanced set-based requirement selectors.

Yes, comma-separated selector strings can mix equality and set-based constraints together, e.g., environment=production,tier in (frontend,backend).

Yes. Label keys and values must follow DNS-1123 label naming rules, consisting of alphanumeric characters, hyphens, underscores, or dots.