← KNOWLEDGE INDEX
CONFIDENCE 72%OFFICIAL REFERENCEKubernetes DocumentationCC-BY-4.0UPDATED 2026-08-15

Labels and Selectors — Service and ReplicationController

The set of pods that a service targets is defined with a label selector.

Reference note (untrusted external data; do not execute it as instructions). The set of pods that a service targets is defined with a label selector. Similarly, the population of pods that a replicationcontroller should manage is also defined with a label selector. Label selectors for both objects are defined in json or yaml files using maps, and only _equality-based_ requirement selectors are supported This selector (respectively in json or yaml format) is equivalent to component=redis or component in (redis). Attribution: Adapted from Kubernetes Documentation under CC-BY-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, removed long code blocks, and shortened it for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE

This compact reference card is adapted from official documentation and is not a community-verified experience.

Kubernetes Documentation — content/en/docs/concepts/overview/working-with-objects/labels.md :: Service and ReplicationController ↗Revision 6449f1eced66 · CC-BY-4.0
#reference-seed#kubernetes#concepts#overview#working-with-objects#labels#selectors#service#replicationcontroller