Skip to content

Commit d912860

Browse files
committed
List supported field selectors by kind
Signed-off-by: Mario Valderrama <[email protected]>
1 parent fb0089e commit d912860

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

content/en/docs/concepts/overview/working-with-objects/field-selectors.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ kubectl get ingress --field-selector foo.bar=baz
3232
Error from server (BadRequest): Unable to find "ingresses" that match label selector "", field selector "foo.bar=baz": "foo.bar" is not a known field selector: only "metadata.name", "metadata.namespace"
3333
```
3434

35+
### List of supported fields
36+
37+
| Kind | Fields |
38+
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39+
| Pod | `spec.nodeName`<br>`spec.restartPolicy`<br>`spec.schedulerName`<br>`spec.serviceAccountName`<br>`spec.hostNetwork`<br>`status.phase`<br>`status.podIP`<br>`status.nominatedNodeName` |
40+
| Event | `involvedObject.kind`<br>`involvedObject.namespace`<br>`involvedObject.name`<br>`involvedObject.uid`<br>`involvedObject.apiVersion`<br>`involvedObject.resourceVersion`<br>`involvedObject.fieldPath`<br>`reason`<br>`reportingComponent`<br>`source`<br>`type` |
41+
| Secret | `type` |
42+
| Namespace | `status.phase` |
43+
| ReplicaSet | `status.replicas` |
44+
| Job | `status.successful` |
45+
| Node | `spec.unschedulable` |
46+
3547
## Supported operators
3648

3749
You can use the `=`, `==`, and `!=` operators with field selectors (`=` and `==` mean the same thing). This `kubectl` command, for example, selects all Kubernetes Services that aren't in the `default` namespace:
@@ -58,4 +70,4 @@ You can use field selectors across multiple resource types. This `kubectl` comma
5870

5971
```shell
6072
kubectl get statefulsets,services --all-namespaces --field-selector metadata.namespace!=default
61-
```
73+
```

0 commit comments

Comments
 (0)