# Feature Request: Support "in" syntax for fieldSelector on metadata.name

**URL:** <https://discuss.kubernetes.io/t/feature-request-support-in-syntax-for-fieldselector-on-metadata-name/33204>\
**Category:** General Discussions\
**Created:** [September 14, 2025, 12:21pm UTC](https://discuss.kubernetes.io/t/feature-request-support-in-syntax-for-fieldselector-on-metadata-name/33204 "2025-09-14T12:21:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![silence-coding](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/silence-coding/32/17655_2.png) [@silence-coding](https://discuss.kubernetes.io/u/silence-coding)\
**Post date:** [September 14, 2025, 12:21pm UTC](https://discuss.kubernetes.io/t/feature-request-support-in-syntax-for-fieldselector-on-metadata-name/33204/1 "2025-09-14T12:21:33Z")

</div>

**Is your feature request related to a problem? Please describe.**  
Currently, Kubernetes `fieldSelector` only supports `=` and `!=` operations. This makes it impossible to query multiple resources by their names in a single request.

For example, the following does **not** work:  
kubectl get pods --field-selector=metadata.name in (pod1, pod2, pod3)

nginx  
复制代码  
The API returns an error:  
invalid selector: ‘metadata.name in (pod1, pod2, pod3)’; can’t understand ’ pod2, pod3)’

markdown  
复制代码

**Describe the solution you’d like**  
Add support for `in` and `notin` operators for `metadata.name` in `fieldSelector`. This would allow querying multiple objects by name in a single API call, improving efficiency and reducing the need for multiple requests or client-side filtering.

Example usage:  
kubectl get pods --field-selector=metadata.name in (pod1, pod2, pod3)

markdown  
复制代码

**Describe alternatives you’ve considered**

- Multiple separate requests:  
kubectl get pods --field-selector=metadata.name=pod1  
kubectl get pods --field-selector=metadata.name=pod2  
kubectl get pods --field-selector=metadata.name=pod3

markdown  
复制代码

- Inefficient and cumbersome for large numbers of objects.
- Use labels to tag objects with unique identifiers and then `labelSelector` with `in`.
  - Adds unnecessary complexity and duplication.

**Additional context**  
Supporting `metadata.name in (...)` would make `fieldSelector` much more practical for real-world o
