Skip to content

Commit 40b4631

Browse files
authored
Merge pull request #38799 from Zhuzhenghao/fix/kubernetes-objects
[zh-cn] Sync kubernetes-objects.md with en page
2 parents cb3c90b + 22ca6f8 commit 40b4631

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

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

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This page explains how Kubernetes objects are represented in the Kubernetes API,
2525

2626
<!-- body -->
2727
<!--
28-
## Understanding Kubernetes Objects
28+
## Understanding Kubernetes objects {#kubernetes-objects}
2929
3030
*Kubernetes objects* are persistent entities in the Kubernetes system. Kubernetes uses these
3131
entities to represent the state of your cluster. Specifically, they can describe:
@@ -45,17 +45,16 @@ Kubernetes 使用这些实体去表示整个集群的状态。
4545
* 关于应用运行时表现的策略,比如重启策略、升级策略以及容错策略
4646

4747
<!--
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/).
5958
-->
6059
Kubernetes 对象是“目标性记录” —— 一旦创建该对象,Kubernetes 系统将不断工作以确保该对象存在。
6160
通过创建对象,你就是在告知 Kubernetes 系统,你想要的集群工作负载状态看起来应是什么样子的,
@@ -68,7 +67,7 @@ Kubernetes 对象是“目标性记录” —— 一旦创建该对象,Kuberne
6867
来直接调用 Kubernetes API。
6968

7069
<!--
71-
### Object Spec and Status
70+
### Object spec and status
7271
7372
Almost every Kubernetes object includes two nested object fields that govern
7473
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
9998
application running on your cluster. When you create the Deployment, you
10099
might set the Deployment `spec` to specify that you want three replicas of
101100
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
103102
the status to match your spec. If any of those instances should fail
104103
(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
106105
a replacement instance.
107106
-->
108107
例如,Kubernetes 中的 Deployment 对象能够表示运行在集群中的应用。
@@ -113,14 +112,14 @@ Kubernetes 系统读取 Deployment 的 `spec`,
113112
`spec` 和状态间的不一致 —— 意味着它会启动一个新的实例来替换。
114113

115114
<!--
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
117116
[Kubernetes API Conventions](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md).
118117
-->
119118
关于对象 spec、status 和 metadata 的更多信息,可参阅
120119
[Kubernetes API 约定](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md)
121120

122121
<!--
123-
### Describing a Kubernetes Object
122+
### Describing a Kubernetes object
124123
125124
When you create an object in Kubernetes, you must provide the object spec that describes its
126125
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
168167
```
169168

170169
<!--
171-
### Required Fields
170+
### Required fields
172171
173172
In the `.yaml` file for the Kubernetes object you want to create, you'll need to set values for the following fields:
174173
@@ -225,11 +224,11 @@ detail the structure of that `.status` field, and its content for each different
225224

226225
<!--
227226
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).
233232
-->
234233
进一步了解以下信息:
235234
* 最重要的 Kubernetes 基本对象 [Pod](/zh-cn/docs/concepts/workloads/pods/)

0 commit comments

Comments
 (0)