The field selectors documentation lists supported fields per resource type. For Services, only metadata.name and metadata.namespace are documented.
However, I've seen a project note (measured against apiserver v1.35.0) stating that spec.type is a supported field selector for Services:
kubectl get svc -A --field-selector spec.type=LoadBalancer
while other sources report Error from server: field label not supported: spec.type.
My questions:
- Is
spec.typea valid field selector for Services, and if so, since which Kubernetes version was it added? - If unsupported, does the API server reject it with 400, or silently ignore it?
I want a portable answer (not version-accidental behavior).