@@ -36,13 +36,13 @@ entities to represent the state of your cluster. Specifically, they can describe
36
36
-->
37
37
## 理解 Kubernetes 对象 {#kubernetes-objects}
38
38
39
- 在 Kubernetes 系统中,** Kubernetes 对象** 是持久化的实体。
39
+ 在 Kubernetes 系统中,** Kubernetes 对象** 是持久化的实体。
40
40
Kubernetes 使用这些实体去表示整个集群的状态。
41
- 比較特别地是 ,它们描述了如下信息:
41
+ 比较特别地是 ,它们描述了如下信息:
42
42
43
43
* 哪些容器化应用正在运行(以及在哪些节点上运行)
44
44
* 可以被应用使用的资源
45
- * 关于应用运行时表现的策略,比如重启策略、升级策略,以及容错策略
45
+ * 关于应用运行时表现的策略,比如重启策略、升级策略以及容错策略
46
46
47
47
<!--
48
48
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.
57
57
You can also use the Kubernetes API directly in your own programs using
58
58
one of the [Client Libraries](/docs/reference/using-api/client-libraries/).
59
59
-->
60
- Kubernetes 对象是“目标性记录”——一旦创建对象 ,Kubernetes 系统将不断工作以确保对象存在 。
60
+ Kubernetes 对象是“目标性记录” —— 一旦创建该对象 ,Kubernetes 系统将不断工作以确保该对象存在 。
61
61
通过创建对象,你就是在告知 Kubernetes 系统,你想要的集群工作负载状态看起来应是什么样子的,
62
62
这就是 Kubernetes 集群所谓的 ** 期望状态(Desired State)** 。
63
63
64
- 操作 Kubernetes 对象 —— 无论是创建、修改,或者删除 —— 需要使用
64
+ 操作 Kubernetes 对象 —— 无论是创建、修改或者删除 —— 需要使用
65
65
[ Kubernetes API] ( /zh-cn/docs/concepts/overview/kubernetes-api ) 。
66
66
比如,当使用 ` kubectl ` 命令行接口(CLI)时,CLI 会调用必要的 Kubernetes API;
67
67
也可以在程序中使用[ 客户端库] ( /zh-cn/docs/reference/using-api/client-libraries/ ) ,
@@ -109,8 +109,8 @@ a replacement instance.
109
109
当创建 Deployment 时,可能会去设置 Deployment 的 ` spec ` ,以指定该应用要有 3 个副本运行。
110
110
Kubernetes 系统读取 Deployment 的 ` spec ` ,
111
111
并启动我们所期望的应用的 3 个实例 —— 更新状态以与规约相匹配。
112
- 如果这些实例中有的失败了(一种状态变更),Kubernetes 系统会通过执行修正操作
113
- 来响应 ` spec ` 和状态间的不一致 —— 意味着它会启动一个新的实例来替换。
112
+ 如果这些实例中有的失败了(一种状态变更),Kubernetes 系统会通过执行修正操作来响应
113
+ ` spec ` 和状态间的不一致 —— 意味着它会启动一个新的实例来替换。
114
114
115
115
<!--
116
116
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
183
183
184
184
* ` apiVersion ` - 创建该对象所使用的 Kubernetes API 的版本
185
185
* ` kind ` - 想要创建的对象的类别
186
- * ` metadata ` - 帮助唯一性标识对象的一些数据 ,包括一个 ` name ` 字符串、` UID ` 和可选的 ` namespace `
186
+ * ` metadata ` - 帮助唯一标识对象的一些数据 ,包括一个 ` name ` 字符串、` UID ` 和可选的 ` namespace `
187
187
* ` spec ` - 你所期望的该对象的状态
188
188
189
189
<!--
@@ -211,12 +211,13 @@ Different kinds of object can also have different `.status`; again, the API refe
211
211
detail the structure of that `.status` field, and its content for each different type of object.
212
212
-->
213
213
例如,参阅 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 ) 。
215
215
对于每个 Pod,其 ` .spec ` 字段设置了 Pod 及其期望状态(例如 Pod 中每个容器的容器镜像名称)。
216
216
另一个对象规约的例子是 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 ) 。
218
218
对于 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。
220
221
不同类型的对象可以由不同的 ` .status ` 信息。API 参考页面给出了 ` .status ` 字段的详细结构,
221
222
以及针对不同类型 API 对象的具体内容。
222
223
0 commit comments