Skip to content

Commit 445b113

Browse files
authored
Merge pull request #35469 from windsonsea/k8sobj
[zh-cn] updated /overview/working-with-objects/kubernetes-objects.md
2 parents 55524b0 + 9163cfc commit 445b113

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ entities to represent the state of your cluster. Specifically, they can describe
3636
-->
3737
## 理解 Kubernetes 对象 {#kubernetes-objects}
3838

39-
在 Kubernetes 系统中,**Kubernetes 对象**是持久化的实体。
39+
在 Kubernetes 系统中,**Kubernetes 对象** 是持久化的实体。
4040
Kubernetes 使用这些实体去表示整个集群的状态。
41-
比較特别地是,它们描述了如下信息:
41+
比较特别地是,它们描述了如下信息:
4242

4343
* 哪些容器化应用正在运行(以及在哪些节点上运行)
4444
* 可以被应用使用的资源
45-
* 关于应用运行时表现的策略,比如重启策略、升级策略,以及容错策略
45+
* 关于应用运行时表现的策略,比如重启策略、升级策略以及容错策略
4646

4747
<!--
4848
A Kubernetes object is a "record of intent" - once you create the object,
@@ -57,11 +57,11 @@ the CLI makes the necessary Kubernetes API calls for you.
5757
You can also use the Kubernetes API directly in your own programs using
5858
one of the [Client Libraries](/docs/reference/using-api/client-libraries/).
5959
-->
60-
Kubernetes 对象是“目标性记录”——一旦创建对象,Kubernetes 系统将不断工作以确保对象存在
60+
Kubernetes 对象是“目标性记录” —— 一旦创建该对象,Kubernetes 系统将不断工作以确保该对象存在
6161
通过创建对象,你就是在告知 Kubernetes 系统,你想要的集群工作负载状态看起来应是什么样子的,
6262
这就是 Kubernetes 集群所谓的 **期望状态(Desired State)**
6363

64-
操作 Kubernetes 对象 —— 无论是创建、修改,或者删除 —— 需要使用
64+
操作 Kubernetes 对象 —— 无论是创建、修改或者删除 —— 需要使用
6565
[Kubernetes API](/zh-cn/docs/concepts/overview/kubernetes-api)
6666
比如,当使用 `kubectl` 命令行接口(CLI)时,CLI 会调用必要的 Kubernetes API;
6767
也可以在程序中使用[客户端库](/zh-cn/docs/reference/using-api/client-libraries/)
@@ -109,8 +109,8 @@ a replacement instance.
109109
当创建 Deployment 时,可能会去设置 Deployment 的 `spec`,以指定该应用要有 3 个副本运行。
110110
Kubernetes 系统读取 Deployment 的 `spec`
111111
并启动我们所期望的应用的 3 个实例 —— 更新状态以与规约相匹配。
112-
如果这些实例中有的失败了(一种状态变更),Kubernetes 系统会通过执行修正操作
113-
来响应 `spec` 和状态间的不一致 —— 意味着它会启动一个新的实例来替换。
112+
如果这些实例中有的失败了(一种状态变更),Kubernetes 系统会通过执行修正操作来响应
113+
`spec` 和状态间的不一致 —— 意味着它会启动一个新的实例来替换。
114114

115115
<!--
116116
For more information on the object spec, status, and metadata, see the
@@ -183,7 +183,7 @@ In the `.yaml` file for the Kubernetes object you want to create, you'll need to
183183

184184
* `apiVersion` - 创建该对象所使用的 Kubernetes API 的版本
185185
* `kind` - 想要创建的对象的类别
186-
* `metadata` - 帮助唯一性标识对象的一些数据,包括一个 `name` 字符串、`UID` 和可选的 `namespace`
186+
* `metadata` - 帮助唯一标识对象的一些数据,包括一个 `name` 字符串、`UID` 和可选的 `namespace`
187187
* `spec` - 你所期望的该对象的状态
188188

189189
<!--
@@ -211,12 +211,13 @@ Different kinds of object can also have different `.status`; again, the API refe
211211
detail the structure of that `.status` field, and its content for each different type of object.
212212
-->
213213
例如,参阅 Pod API 参考文档中
214-
[`spec` 字段](/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec)
214+
[`spec` 字段](/zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec)
215215
对于每个 Pod,其 `.spec` 字段设置了 Pod 及其期望状态(例如 Pod 中每个容器的容器镜像名称)。
216216
另一个对象规约的例子是 StatefulSet API 中的
217-
[`spec` 字段](/docs/reference/kubernetes-api/workload-resources/stateful-set-v1/#StatefulSetSpec)
217+
[`spec` 字段](/zh-cn/docs/reference/kubernetes-api/workload-resources/stateful-set-v1/#StatefulSetSpec)
218218
对于 StatefulSet 而言,其 `.spec` 字段设置了 StatefulSet 及其期望状态。
219-
在 StatefulSet 的 `.spec` 内,有一个为 Pod 对象提供的[模板](/zh-cn/docs/concepts/workloads/pods/#pod-templates)。该模板描述了 StatefulSet 控制器为了满足 StatefulSet 规约而要创建的 Pod。
219+
在 StatefulSet 的 `.spec` 内,有一个为 Pod 对象提供的[模板](/zh-cn/docs/concepts/workloads/pods/#pod-templates)
220+
该模板描述了 StatefulSet 控制器为了满足 StatefulSet 规约而要创建的 Pod。
220221
不同类型的对象可以由不同的 `.status` 信息。API 参考页面给出了 `.status` 字段的详细结构,
221222
以及针对不同类型 API 对象的具体内容。
222223

0 commit comments

Comments
 (0)