Skip to content

Commit c783bb3

Browse files
authored
Merge pull request #38798 from Zhuzhenghao/fix/field-selector
[zh-cn] Sync field-selector.md with en page
2 parents bf9b40f + 341bbea commit c783bb3

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ weight: 70
1010
-->
1111

1212
<!--
13-
_Field selectors_ let you [select Kubernetes resources](/docs/concepts/overview/working-with-objects/kubernetes-objects) based on the value of one or more resource fields. Here are some example field selector queries:
13+
_Field selectors_ let you [select Kubernetes resources](/docs/concepts/overview/working-with-objects/kubernetes-objects) based on the value of one or more resource fields. Here are some examples of field selector queries:
1414
-->
1515
“字段选择器(Field selectors)”允许你根据一个或多个资源字段的值
1616
[筛选 Kubernetes 资源](/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects)
@@ -29,18 +29,15 @@ This `kubectl` command selects all Pods for which the value of the [`status.phas
2929
```shell
3030
kubectl get pods --field-selector status.phase=Running
3131
```
32+
33+
{{< note >}}
3234
<!--
33-
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 following `kubectl` queries equivalent:
35+
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.
3436
-->
35-
{{< note >}}
3637
字段选择器本质上是资源“过滤器(Filters)”。默认情况下,字段选择器/过滤器是未被应用的,
3738
这意味着指定类型的所有资源都会被筛选出来。
38-
这使得以下的两个 `kubectl` 查询是等价的
39+
这使得 `kubectl get pods``kubectl get pods --field-selector ""` 这两个 `kubectl` 查询是等价的
3940

40-
```shell
41-
kubectl get pods
42-
kubectl get pods --field-selector ""
43-
```
4441
{{< /note >}}
4542

4643
<!--

0 commit comments

Comments
 (0)