@@ -25,7 +25,7 @@ This page explains how Kubernetes objects are represented in the Kubernetes API,
25
25
26
26
<!-- body -->
27
27
<!--
28
- ## Understanding Kubernetes Objects
28
+ ## Understanding Kubernetes objects {#kubernetes-objects}
29
29
30
30
*Kubernetes objects* are persistent entities in the Kubernetes system. Kubernetes uses these
31
31
entities to represent the state of your cluster. Specifically, they can describe:
@@ -45,17 +45,16 @@ Kubernetes 使用这些实体去表示整个集群的状态。
45
45
* 关于应用运行时表现的策略,比如重启策略、升级策略以及容错策略
46
46
47
47
<!--
48
- A Kubernetes object is a "record of intent" - once you create the object,
49
- the Kubernetes system will constantly work to ensure that object exists.
50
- By creating an object, you're effectively telling the Kubernetes system what
51
- you want your cluster's workload to look like; this is your cluster's *desired state*.
52
-
53
- To work with Kubernetes objects - whether to create, modify, or delete them -
54
- you'll need to use the [Kubernetes API](/docs/concepts/overview/kubernetes-api/).
55
- When you use the `kubectl` command-line interface, for example,
56
- the CLI makes the necessary Kubernetes API calls for you.
57
- You can also use the Kubernetes API directly in your own programs using
58
- one of the [Client Libraries](/docs/reference/using-api/client-libraries/).
48
+ A Kubernetes object is a "record of intent"--once you create the object, the Kubernetes system
49
+ will constantly work to ensure that object exists. By creating an object, you're effectively
50
+ telling the Kubernetes system what you want your cluster's workload to look like; this is your
51
+ cluster's *desired state*.
52
+
53
+ To work with Kubernetes objects--whether to create, modify, or delete them--you'll need to use the
54
+ [Kubernetes API](/docs/concepts/overview/kubernetes-api/). When you use the `kubectl` command-line
55
+ interface, for example, the CLI makes the necessary Kubernetes API calls for you. You can also use
56
+ the Kubernetes API directly in your own programs using one of the
57
+ [Client Libraries](/docs/reference/using-api/client-libraries/).
59
58
-->
60
59
Kubernetes 对象是“目标性记录” —— 一旦创建该对象,Kubernetes 系统将不断工作以确保该对象存在。
61
60
通过创建对象,你就是在告知 Kubernetes 系统,你想要的集群工作负载状态看起来应是什么样子的,
@@ -68,7 +67,7 @@ Kubernetes 对象是“目标性记录” —— 一旦创建该对象,Kuberne
68
67
来直接调用 Kubernetes API。
69
68
70
69
<!--
71
- ### Object Spec and Status
70
+ ### Object spec and status
72
71
73
72
Almost every Kubernetes object includes two nested object fields that govern
74
73
the object's configuration: the object *`spec`* and the object *`status`*.
@@ -99,10 +98,10 @@ For example: in Kubernetes, a Deployment is an object that can represent an
99
98
application running on your cluster. When you create the Deployment, you
100
99
might set the Deployment `spec` to specify that you want three replicas of
101
100
the application to be running. The Kubernetes system reads the Deployment
102
- spec and starts three instances of your desired application-updating
101
+ spec and starts three instances of your desired application-- updating
103
102
the status to match your spec. If any of those instances should fail
104
103
(a status change), the Kubernetes system responds to the difference
105
- between spec and status by making a correction-in this case, starting
104
+ between spec and status by making a correction-- in this case, starting
106
105
a replacement instance.
107
106
-->
108
107
例如,Kubernetes 中的 Deployment 对象能够表示运行在集群中的应用。
@@ -113,14 +112,14 @@ Kubernetes 系统读取 Deployment 的 `spec`,
113
112
` spec ` 和状态间的不一致 —— 意味着它会启动一个新的实例来替换。
114
113
115
114
<!--
116
- For more information on the object spec, status, and metadata, see the
115
+ For more information on the object spec, status, and metadata, see the
117
116
[Kubernetes API Conventions](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md).
118
117
-->
119
118
关于对象 spec、status 和 metadata 的更多信息,可参阅
120
119
[ Kubernetes API 约定] ( https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md ) 。
121
120
122
121
<!--
123
- ### Describing a Kubernetes Object
122
+ ### Describing a Kubernetes object
124
123
125
124
When you create an object in Kubernetes, you must provide the object spec that describes its
126
125
desired state, as well as some basic information about the object (such as a name). When you use
@@ -168,7 +167,7 @@ deployment.apps/nginx-deployment created
168
167
```
169
168
170
169
<!--
171
- ### Required Fields
170
+ ### Required fields
172
171
173
172
In the `.yaml` file for the Kubernetes object you want to create, you'll need to set values for the following fields:
174
173
@@ -225,11 +224,11 @@ detail the structure of that `.status` field, and its content for each different
225
224
226
225
<!--
227
226
Learn more about the following:
228
- * [Pods](https://kubernetes.io /docs/concepts/workloads/pods/) which are the most important basic Kubernetes objects.
229
- * [Deployment](https://kubernetes.io/ docs/concepts/workloads/controllers/deployment/) objects.
230
- * [Controllers](https://kubernetes.io /docs/concepts/architecture/controller/) in Kubernetes.
231
- * [Kubernetes API overview](https://kubernetes.io /docs/reference/using-api/) which explains some more API concepts.
232
- * [kubectl](https://kubernetes.io/ docs/reference/kubectl/) and [kubectl commands](https://kubernetes.io /docs/reference/generated/kubectl/kubectl-commands).
227
+ * [Pods](/docs/concepts/workloads/pods/) which are the most important basic Kubernetes objects.
228
+ * [Deployment](/ docs/concepts/workloads/controllers/deployment/) objects.
229
+ * [Controllers](/docs/concepts/architecture/controller/) in Kubernetes.
230
+ * [Kubernetes API overview](/docs/reference/using-api/) which explains some more API concepts.
231
+ * [kubectl](/ docs/reference/kubectl/) and [kubectl commands](/docs/reference/generated/kubectl/kubectl-commands).
233
232
-->
234
233
进一步了解以下信息:
235
234
* 最重要的 Kubernetes 基本对象 [ Pod] ( /zh-cn/docs/concepts/workloads/pods/ ) 。
0 commit comments