Skip to content

Commit 2978aea

Browse files
authored
Merge pull request #25001 from tengqm/zh-sync-3
[zh] Sync changes from English site (3)
2 parents 78f1dfd + 95ab5ac commit 2978aea

File tree

8 files changed

+104
-57
lines changed

8 files changed

+104
-57
lines changed

content/zh/docs/concepts/architecture/control-plane-node-communication.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ apiserver 被配置为在一个安全的 HTTPS 端口(443)上监听远程连
3838
[服务账号令牌](/docs/reference/access-authn-authz/authentication/#service-account-tokens)的时候。
3939

4040
<!--
41-
Nodes should be provisioned with the public root certificate for the cluster such that they can connect securely to the apiserver along with valid client credentials. For example, on a default GKE deployment, the client credentials provided to the kubelet are in the form of a client certificate. See [kubelet TLS bootstrapping](/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/) for automated provisioning of kubelet client certificates.
41+
Nodes should be provisioned with the public root certificate for the cluster such that they can connect securely to the apiserver along with valid client credentials. A good approach is that the client credentials provided to the kubelet are in the form of a client certificate. See [kubelet TLS bootstrapping](/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/) for automated provisioning of kubelet client certificates.
4242
-->
4343
应该使用集群的公共根证书开通节点,这样它们就能够基于有效的客户端凭据安全地连接 apiserver。
44-
例如:在一个默认的 GCE 部署中,客户端凭据以客户端证书的形式提供给 kubelet。
44+
一种好的方法是以客户端证书的形式将客户端凭据提供给 kubelet。
4545
请查看 [kubelet TLS 启动引导](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)
4646
以了解如何自动提供 kubelet 客户端证书。
4747

@@ -103,16 +103,16 @@ To verify this connection, use the `--kubelet-certificate-authority` flag to pro
103103
If that is not possible, use [SSH tunneling](/docs/concepts/architecture/master-node-communication/#ssh-tunnels) between the apiserver and kubelet if required to avoid connecting over an
104104
untrusted or public network.
105105
106-
Finally, [Kubelet authentication and/or authorization](/docs/admin/kubelet-authentication-authorization/) should be enabled to secure the kubelet API.
106+
Finally, [Kubelet authentication and/or authorization](/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/) should be enabled to secure the kubelet API.
107107
-->
108-
109108
为了对这个连接进行认证,使用 `--kubelet-certificate-authority` 标志给 apiserver
110109
提供一个根证书包,用于 kubelet 的服务证书。
111110

112111
如果无法实现这点,又要求避免在非受信网络或公共网络上进行连接,可在 apiserver 和
113112
kubelet 之间使用 [SSH 隧道](#ssh-tunnels)
114113

115-
最后,应该启用 [Kubelet 用户认证和/或鉴权](/zh/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/)
114+
最后,应该启用
115+
[kubelet 用户认证和/或鉴权](/zh/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/)
116116
来保护 kubelet API。
117117

118118
<!--

content/zh/docs/concepts/architecture/controller.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,27 @@ nodes in your cluster. See
155155
(实际上有一个控制器可以水平地扩展集群中的节点。请参阅
156156
[集群自动扩缩容](/zh/docs/tasks/administer-cluster/cluster-management/#cluster-autoscaling))。
157157

158+
<!--
159+
The important point here is that the controller makes some change to bring about
160+
your desired state, and then reports current state back to your cluster's API server.
161+
Other control loops can observe that reported data and take their own actions.
162+
-->
163+
这里,很重要的一点是,控制器做出了一些变更以使得事物更接近你的期望状态,
164+
之后将当前状态报告给集群的 API 服务器。
165+
其他控制回路可以观测到所汇报的数据的这种变化并采取其各自的行动。
166+
167+
<!--
168+
In the thermostat example, if the room is very cold then a different controller
169+
might also turn on a frost protection heater. With Kubernetes clusters, the control
170+
plane indirectly works with IP address management tools, storage services,
171+
cloud provider APIS, and other services by
172+
[extending Kubernetes](/docs/concepts/extend-kubernetes/) to implement that.
173+
-->
174+
在温度计的例子中,如果房间很冷,那么某个控制器可能还会启动一个防冻加热器。
175+
就 Kubernetes 集群而言,控制面间接地与 IP 地址管理工具、存储服务、云驱动
176+
APIs 以及其他服务协作,通过[扩展 Kubernetes](/zh/docs/concepts/extend-kubernetes/)
177+
来实现这点。
178+
158179
<!--
159180
## Desired versus current state {#desired-vs-current}
160181

content/zh/docs/concepts/architecture/nodes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ a Lease object.
487487
<!--
488488
#### Reliability
489489
490-
In most cases, node controller limits the eviction rate to
490+
In most cases, the node controller limits the eviction rate to
491491
`-node-eviction-rate` (default 0.1) per second, meaning it won't evict pods
492492
from more than 1 node per 10 seconds.
493493
-->

content/zh/docs/concepts/containers/container-lifecycle-hooks.md

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ There are two hooks that are exposed to Containers:
4848
`PostStart`
4949

5050
<!--
51-
This hook executes immediately after a container is created.
51+
This hook is executed immediately after a container is created.
5252
However, there is no guarantee that the hook will execute before the container ENTRYPOINT.
5353
No parameters are passed to the handler.
5454
-->
55-
这个回调在创建容器之后立即执行
55+
这个回调在容器被创建之后立即被执行
5656
但是,不能保证回调会在容器入口点(ENTRYPOINT)之前执行。
5757
没有参数传递给处理程序。
5858

@@ -61,13 +61,13 @@ No parameters are passed to the handler.
6161
<!--
6262
This hook is called immediately before a container is terminated due to an API request or management event such as liveness probe failure, preemption, resource contention and others. A call to the preStop hook fails if the container is already in terminated or completed state.
6363
It is blocking, meaning it is synchronous,
64-
so it must complete before the call to delete the container can be sent.
64+
so it must complete before the signal to stop the container can be sent.
6565
No parameters are passed to the handler.
6666
-->
6767
在容器因 API 请求或者管理事件(诸如存活态探针失败、资源抢占、资源竞争等)而被终止之前,
6868
此回调会被调用。
6969
如果容器已经处于终止或者完成状态,则对 preStop 回调的调用将失败。
70-
此调用是阻塞的,也是同步调用,因此必须在删除容器的调用之前完成
70+
此调用是阻塞的,也是同步调用,因此必须在发出删除容器的信号之前完成
7171
没有参数传递给处理程序。
7272

7373
<!--
@@ -102,11 +102,13 @@ Resources consumed by the command are counted against the Container.
102102
### Hook handler execution
103103
104104
When a Container lifecycle management hook is called,
105-
the Kubernetes management system executes the handler in the Container registered for that hook. 
105+
the Kubernetes management system execute the handler according to the hook action,
106+
`exec` and `tcpSocket` are executed in the container, and `httpGet` is executed by the kubelet process.
106107
-->
107108
### 回调处理程序执行
108109

109-
当调用容器生命周期管理回调时,Kubernetes 管理系统在注册了回调的容器中执行处理程序。
110+
当调用容器生命周期管理回调时,Kubernetes 管理系统根据回调动作执行其处理程序,
111+
`exec``tcpSocket` 在容器内执行,而 `httpGet` 则由 kubelet 进程执行。
110112

111113
<!--
112114
Hook handler calls are synchronous within the context of the Pod containing the Container.
@@ -120,15 +122,35 @@ the Container cannot reach a `running` state.
120122
但是,如果回调运行或挂起的时间太长,则容器无法达到 `running` 状态。
121123

122124
<!--
123-
The behavior is similar for a `PreStop` hook.
124-
If the hook hangs during execution,
125-
the Pod phase stays in a `Terminating` state and is killed after `terminationGracePeriodSeconds` of pod ends.
126-
If a `PostStart` or `PreStop` hook fails,
125+
`PreStop` hooks are not executed asynchronously from the signal
126+
to stop the Container; the hook must complete its execution before
127+
the signal can be sent.
128+
If a `PreStop` hook hangs during execution,
129+
the Pod's phase will be `Terminating` and remain there until the Pod is
130+
killed after its `terminationGracePeriodSeconds` expires.
131+
This grace period applies to the total time it takes for both
132+
the `PreStop` hook to execute and for the Container to stop normally.
133+
If, for example, `terminationGracePeriodSeconds` is 60, and the hook
134+
takes 55 seconds to complete, and the Container takes 10 seconds to stop
135+
normally after receiving the signal, then the Container will be killed
136+
before it can stop normally, since `terminationGracePeriodSeconds` is
137+
less than the total time (55+10) it takes for these two things to happen.
138+
-->
139+
`PreStop` 回调并不会与停止容器的信号处理程序异步执行;回调必须在
140+
可以发送信号之前完成执行。
141+
如果 `PreStop` 回调在执行期间停滞不前,Pod 的阶段会变成 `Terminating`
142+
并且一致处于该状态,直到其 `terminationGracePeriodSeconds` 耗尽为止,
143+
这时 Pod 会被杀死。
144+
这一宽限期是针对 `PreStop` 回调的执行时间及容器正常停止时间的总和而言的。
145+
例如,如果 `terminationGracePeriodSeconds` 是 60,回调函数花了 55 秒钟
146+
完成执行,而容器在收到信号之后花了 10 秒钟来正常结束,那么容器会在其
147+
能够正常结束之前即被杀死,因为 `terminationGracePeriodSeconds` 的值
148+
小于后面两件事情所花费的总时间(55 + 10)。
149+
150+
<!--
151+
If either a `PostStart` or `PreStop` hook fails,
127152
it kills the Container.
128153
-->
129-
行为与 `PreStop` 回调的行为类似。
130-
如果回调在执行过程中挂起,Pod 阶段将保持在 `Terminating` 状态,
131-
并在 Pod 结束的 `terminationGracePeriodSeconds` 之后被杀死。
132154
如果 `PostStart``PreStop` 回调失败,它会杀死容器。
133155

134156
<!--
@@ -147,10 +169,11 @@ which means that a hook may be called multiple times for any given event,
147169
such as for `PostStart` or `PreStop`.
148170
It is up to the hook implementation to handle this correctly.
149171
-->
150-
### 回调寄送保证
172+
### 回调递送保证
151173

152-
回调的寄送应该是 *至少一次*,这意味着对于任何给定的事件,例如 `PostStart``PreStop`,回调可以被调用多次。
153-
如何正确处理,是回调实现所要考虑的问题。
174+
回调的递送应该是 *至少一次*,这意味着对于任何给定的事件,
175+
例如 `PostStart``PreStop`,回调可以被调用多次。
176+
如何正确处理被多次调用的情况,是回调实现所要考虑的问题。
154177

155178
<!--
156179
Generally, only single deliveries are made.
@@ -160,9 +183,9 @@ In some rare cases, however, double delivery may occur.
160183
For instance, if a kubelet restarts in the middle of sending a hook,
161184
the hook might be resent after the kubelet comes back up.
162185
-->
163-
通常情况下,只会进行单次寄送
186+
通常情况下,只会进行单次递送
164187
例如,如果 HTTP 回调接收器宕机,无法接收流量,则不会尝试重新发送。
165-
然而,偶尔也会发生重复寄送的可能
188+
然而,偶尔也会发生重复递送的可能
166189
例如,如果 kubelet 在发送回调的过程中重新启动,回调可能会在 kubelet 恢复后重新发送。
167190

168191
<!--

content/zh/docs/concepts/containers/images.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Instead, specify a meaningful tag such as `v1.42.0`.
8787
{{< /caution >}}
8888

8989
<!--
90-
## Updating Images
90+
## Updating images
9191
9292
The default pull policy is `IfNotPresent` which causes the
9393
{{< glossary_tooltip text="kubelet" term_id="kubelet" >}} to skip
@@ -116,17 +116,18 @@ When `imagePullPolicy` is defined without a specific value, it is also set to `A
116116
如果 `imagePullPolicy` 未被定义为特定的值,也会被设置为 `Always`
117117

118118
<!--
119-
## Multi-architecture Images with Manifests
119+
## Multi-architecture images with image indexes
120120
121-
As well as providing binary images, a container registry can also serve a [container image manifest](https://github.com/opencontainers/image-spec/blob/master/manifest.md). A manifest can reference image manifests for architecture-specific versions of an container. The idea is that you can have a name for an image (for example: `pause`, `example/mycontainer`, `kube-apiserver`) and allow different systems to fetch the right binary image for the machine architecture they are using.
121+
As well as providing binary images, a container registry can also serve a [container image index](https://github.com/opencontainers/image-spec/blob/master/image-index.md). An image index can point to multiple [image manifests](https://github.com/opencontainers/image-spec/blob/master/manifest.md) for architecture-specific versions of a container. The idea is that you can have a name for an image (for example: `pause`, `example/mycontainer`, `kube-apiserver`) and allow different systems to fetch the right binary image for the machine architecture they are using.
122122
123123
Kubernetes itself typically names container images with a suffix `-$(ARCH)`. For backward compatibility, please generate the older images with suffixes. The idea is to generate say `pause` image which has the manifest for all the arch(es) and say `pause-amd64` which is backwards compatible for older configurations or YAML files which may have hard coded the images with suffixes.
124124
-->
125-
## 使用清单(manifest)构建多架构镜像
125+
## 带镜像索引的多架构镜像 {#multi-architecture-images-with-image-indexes}
126126

127127
除了提供二进制的镜像之外,容器仓库也可以提供
128-
[容器镜像清单](https://github.com/opencontainers/image-spec/blob/master/manifest.md)
129-
清单文件(Manifest)可以为特定于体系结构的镜像版本引用其镜像清单。
128+
[容器镜像索引](https://github.com/opencontainers/image-spec/blob/master/image-index.md)
129+
镜像索引可以根据特定于体系结构版本的容器指向镜像的多个
130+
[镜像清单](https://github.com/opencontainers/image-spec/blob/master/manifest.md)
130131
这背后的理念是让你可以为镜像命名(例如:`pause``example/mycontainer``kube-apiserver`
131132
的同时,允许不同的系统基于它们所使用的机器体系结构取回正确的二进制镜像。
132133

@@ -137,7 +138,7 @@ Kubernetes 自身通常在命名容器镜像时添加后缀 `-$(ARCH)`。
137138
YAML 文件也能兼容。
138139

139140
<!--
140-
## Using a Private Registry
141+
## Using a private registry
141142
142143
Private registries may require keys to read images from them.
143144
Credentials can be provided in several ways:
@@ -179,7 +180,7 @@ These options are explaind in more detail below.
179180
下面将详细描述每一项。
180181

181182
<!--
182-
### Configuring Nodes to authenticate to a Private Registry
183+
### Configuring nodes to authenticate to a private registry
183184
184185
If you run Docker on your nodes, you can configure the Docker container
185186
runtime to authenticate to a private container registry.
@@ -333,7 +334,7 @@ registry keys are added to the `.docker/config.json`.
333334
`.docker/config.json` 中配置了私有仓库密钥后,所有 Pod 都将能读取私有仓库中的镜像。
334335

335336
<!--
336-
### Pre-pulled Images
337+
### Pre-pulled images
337338
-->
338339
### 提前拉取镜像 {#pre-pulled-images}
339340

@@ -371,7 +372,7 @@ All pods will have read access to any pre-pulled images.
371372
所有的 Pod 都可以使用节点上提前拉取的镜像。
372373

373374
<!--
374-
### Specifying ImagePullSecrets on a Pod
375+
### Specifying imagePullSecrets on a Pod
375376
-->
376377
### 在 Pod 上指定 ImagePullSecrets {#specifying-imagepullsecrets-on-a-pod}
377378

@@ -389,7 +390,7 @@ Kubernetes supports specifying container image registry keys on a Pod.
389390
Kubernetes 支持在 Pod 中设置容器镜像仓库的密钥。
390391

391392
<!--
392-
#### Creating a Secret with a Docker Config
393+
#### Creating a Secret with a Docker config
393394
394395
Run the following command, substituting the appropriate uppercase values:
395396
-->
@@ -491,12 +492,12 @@ will be merged.
491492
来自不同来源的凭据会被合并。
492493

493494
<!--
494-
### Use Cases
495+
## Use cases
495496
496497
There are a number of solutions for configuring private registries. Here are some
497498
common use cases and suggested solutions.
498499
-->
499-
### 使用案例 {#use-cases}
500+
## 使用案例 {#use-cases}
500501

501502
配置私有仓库有多种方案,以下是一些常用场景和建议的解决方案。
502503

content/zh/docs/concepts/containers/runtime-class.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,14 @@ Pod 开销通过 RuntimeClass 的 `overhead` 字段定义。
313313
## {{% heading "whatsnext" %}}
314314
315315
<!--
316-
- [RuntimeClass Design](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/runtime-class.md)
317-
- [RuntimeClass Scheduling Design](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/runtime-class-scheduling.md)
318-
- Read about the [Pod Overhead](/docs/concepts/configuration/pod-overhead/) concept
316+
- [RuntimeClass Design](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/585-runtime-class/README.md)
317+
- [RuntimeClass Scheduling Design](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/585-runtime-class/README.md#runtimeclass-scheduling)
318+
- Read about the [Pod Overhead](/docs/concepts/scheduling-eviction/pod-overhead/) concept
319319
- [PodOverhead Feature Design](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/20190226-pod-overhead.md)
320320
-->
321-
- [RuntimeClass 设计](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/runtime-class.md)
322-
- [RuntimeClass 调度设计](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/runtime-class-scheduling.md)
323-
- 阅读关于 [Pod 开销](/zh/docs/concepts/configuration/pod-overhead/) 的概念
321+
- [RuntimeClass 设计](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/585-runtime-class/README.md)
322+
- [RuntimeClass 调度设计](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/585-runtime-class/README.md#runtimeclass-scheduling)
323+
- 阅读关于 [Pod 开销](/zh/docs/concepts/scheduling-eviction/pod-overhead/) 的概念
324324
- [PodOverhead 特性设计](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/20190226-pod-overhead.md)
325325
326326

content/zh/docs/concepts/security/overview.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Disallow privileged users | When constructing containers, consult your documenta
204204

205205
容器安全性不在本指南的探讨范围内。下面是一些探索此主题的建议和连接:
206206

207-
容器关注领域 | 建议 |
207+
容器关注领域 | 建议 |
208208
------------------------------ | -------------- |
209209
容器漏洞扫描和操作系统依赖安全性 | 作为镜像构建的一部分,您应该扫描您的容器里的已知漏洞。
210210
镜像签名和执行 | 对容器镜像进行签名,以维护对容器内容的信任。
@@ -257,8 +257,8 @@ Learn about related Kubernetes security topics:
257257
258258
* [Pod security standards](/docs/concepts/security/pod-security-standards/)
259259
* [Network policies for Pods](/docs/concepts/services-networking/network-policies/)
260+
* [Controlling Access to the Kubernetes API](/docs/concepts/security/controlling-access)
260261
* [Securing your cluster](/docs/tasks/administer-cluster/securing-a-cluster/)
261-
* [API access control](/docs/reference/access-authn-authz/controlling-access/)
262262
* [Data encryption in transit](/docs/tasks/tls/managing-tls-in-a-cluster/) for the control plane
263263
* [Data encryption at rest](/docs/tasks/administer-cluster/encrypt-data/)
264264
* [Secrets in Kubernetes](/docs/concepts/configuration/secret/)
@@ -267,8 +267,9 @@ Learn about related Kubernetes security topics:
267267

268268
* [Pod 安全标准](/zh/docs/concepts/security/pod-security-standards/)
269269
* [Pod 的网络策略](/zh/docs/concepts/services-networking/network-policies/)
270+
* [控制对 Kubernetes API 的访问](/zh/docs/concepts/security/controlling-access/)
270271
* [保护您的集群](/zh/docs/tasks/administer-cluster/securing-a-cluster/)
271-
* [API 访问控制](/zh/docs/reference/access-authn-authz/controlling-access/)
272-
* [加密通信中的数据](/zh/docs/tasks/tls/managing-tls-in-a-cluster/) for the control plane
272+
* 为控制面[加密通信中的数据](/zh/docs/tasks/tls/managing-tls-in-a-cluster/)
273273
* [加密静止状态的数据](/zh/docs/tasks/administer-cluster/encrypt-data/)
274-
* [Kubernetes 的 Secret](/zh/docs/concepts/configuration/secret/)
274+
* [Kubernetes 中的 Secret](/zh/docs/concepts/configuration/secret/)
275+

0 commit comments

Comments
 (0)