Core objects
Labels
12 / 82

Services, Deployments and policies find their targets by label selector.

Labels are free-form key and value pairs on any object. A selector is a query over labels. There are no hard-coded pod names anywhere.

Serviceselector: app=checkoutcheckout-aapp=checkout tier=webcheckout-bapp=checkout tier=webcatalog-aapp=catalog tier=webmatchednot matched

Equality selector

app=checkout, or matchLabels in a Deployment.

Set-based selector

tier in (web, api), env notin (dev), gpu (exists).

Annotations are different

Not selectable. They hold tool metadata such as build ids or ingress settings.

Loose coupling through labels is why a Service automatically adopts new Pods and drops terminated ones with no reconfiguration.