Field selectors let you select Kubernetes resources based on the value of one or more resource fields.
Stuff you wanna know:
- Field selectors are essentially resource filters.
- By default, no selectors/filters are applied, meaning that all resources of the specified type are selected.
- Supported field selectors vary by Kubernetes resource type. All resource types support the
metadata.name
andmetadata.namespace
fields. - Using unsupported field selectors produces an error.
- You can use the
=
,==
, and!=
operators with field selectors (=
and==
mean the same thing). - Field selectors can be chained together as a comma-separated list, just like label and other selectors.
- You can use field selectors across multiple resource types.
More stuff:
- Field Selectors — https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/
- Labels and Selectors — https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/