@@ -27,18 +27,16 @@ This page explains how Kubernetes objects are represented in the Kubernetes API,
27
27
<!--
28
28
## Understanding Kubernetes Objects
29
29
30
- *Kubernetes Objects* are persistent entities in the Kubernetes system.
31
- Kubernetes uses these entities to represent the state of your cluster.
32
-
33
- Specifically, they can describe:
30
+ *Kubernetes objects* are persistent entities in the Kubernetes system. Kubernetes uses these
31
+ entities to represent the state of your cluster. Specifically, they can describe:
34
32
35
33
* What containerized applications are running (and on which nodes)
36
34
* The resources available to those applications
37
35
* The policies around how those applications behave, such as restart policies, upgrades, and fault-tolerance
38
36
-->
39
37
## 理解 Kubernetes 对象 {#kubernetes-objects}
40
38
41
- 在 Kubernetes 系统中,* Kubernetes 对象* 是持久化的实体。
39
+ 在 Kubernetes 系统中,** Kubernetes 对象** 是持久化的实体。
42
40
Kubernetes 使用这些实体去表示整个集群的状态。
43
41
比較特别地是,它们描述了如下信息:
44
42
@@ -83,7 +81,7 @@ its _desired state_.
83
81
几乎每个 Kubernetes 对象包含两个嵌套的对象字段,它们负责管理对象的配置:
84
82
对象 ** ` spec ` (规约)** 和 对象 ** ` status ` (状态)** 。
85
83
对于具有 ` spec ` 的对象,你必须在创建对象时设置其内容,描述你希望对象所具有的特征:
86
- * 期望状态(Desired State)* 。
84
+ ** 期望状态(Desired State)* * 。
87
85
88
86
<!--
89
87
The `status` describes the _current state_ of the object, supplied and updated
@@ -124,11 +122,13 @@ For more information on the object spec, status, and metadata, see the
124
122
<!--
125
123
### Describing a Kubernetes Object
126
124
127
- When you create an object in Kubernetes, you must provide the object spec that describes its desired state,
128
- as well as some basic information about the object (such as a name).
129
- When you use the Kubernetes API to create the object (either directly or via `kubectl`),
130
- that API request must include that information as JSON in the request body.
131
- **Most often, you provide the information to `kubectl` in a .yaml file.** `kubectl` converts the information to JSON when making the API request.
125
+ When you create an object in Kubernetes, you must provide the object spec that describes its
126
+ desired state, as well as some basic information about the object (such as a name). When you use
127
+ the Kubernetes API to create the object (either directly or via `kubectl`), that API request must
128
+ include that information as JSON in the request body. **Most often, you provide the information to
129
+ `kubectl` in a .yaml file.** `kubectl` converts the information to JSON when making the API
130
+ request.
131
+
132
132
133
133
Here's an example `.yaml` file that shows the required fields and object spec for a Kubernetes Deployment:
134
134
-->
@@ -187,9 +187,8 @@ In the `.yaml` file for the Kubernetes object you want to create, you'll need to
187
187
* ` spec ` - 你所期望的该对象的状态
188
188
189
189
<!--
190
- The precise format of the object `spec` is different for every Kubernetes object,
191
- and contains nested fields specific to that object.
192
- The [Kubernetes API Reference](https://kubernetes.io/docs/reference/kubernetes-api/)
190
+ The precise format of the object `spec` is different for every Kubernetes object, and contains
191
+ nested fields specific to that object. The [Kubernetes API Reference](/docs/reference/kubernetes-api/)
193
192
can help you find the spec format for all of the objects you can create using Kubernetes.
194
193
-->
195
194
对每个 Kubernetes 对象而言,其 ` spec ` 之精确格式都是不同的,包含了特定于该对象的嵌套字段。
0 commit comments