Field Selector is a filtering primitive in k8s which allows users to filter k8s objects based on their resource-specific fields (unlike Label Selectors which query user-defined metadata, see Labels and Label Selectors in k8s):
kubectl get pods --field-selector metadata.name=my-podkubectl get pods --field-selector spec.nodeName=my-node
Important
Field Selector support varies depending on the resource type1.
Sources:
Footnotes
-
For more information on resource types see k8s api resources. ↩