You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -38,7 +38,7 @@ kubectl get pods --field-selector status.phase=Running
38
38
<!--
39
39
Field selectors are essentially resource *filters*. By default, no selectors/filters are applied, meaning that all resources of the specified type are selected. This makes the `kubectl` queries `kubectl get pods` and `kubectl get pods --field-selector ""` equivalent.
@@ -83,14 +83,32 @@ Error from server (BadRequest): Unable to find "ingresses" that match label sele
83
83
| Node |`spec.unschedulable`|
84
84
| CertificateSigningRequest |`spec.signerName`|
85
85
86
+
<!--
87
+
### Custom resources fields
88
+
89
+
All custom resource types support the `metadata.name` and `metadata.namespace` fields.
90
+
91
+
Additionally, the `spec.versions[*].selectableFields` field of a {{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}}
92
+
declares which other fields in a custom resource may be used in field selectors. See [selectable fields for custom resources](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#crd-selectable-fields)
93
+
for more information about how to use field selectors with CustomResourceDefinitions.
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:
@@ -111,10 +129,10 @@ kubectl get services --all-namespaces --field-selector metadata.namespace!=defa
111
129
112
130
As with [label](/docs/concepts/overview/working-with-objects/labels) and other selectors, field selectors can be chained together as a comma-separated list. This `kubectl` command selects all Pods for which the `status.phase` does not equal `Running` and the `spec.restartPolicy` field equals `Always`:
0 commit comments