Skip to content

Commit 5590959

Browse files
authored
Merge pull request #29501 from chenxuc/task-misc
[zh]sync misc task files
2 parents b6af695 + a33bc3b commit 5590959

File tree

6 files changed

+46
-38
lines changed

6 files changed

+46
-38
lines changed

content/zh/docs/tasks/configmap-secret/managing-secret-using-config-file.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 20
55
description: 使用资源配置文件创建 Secret 对象。
66
---
77
<!--
8-
title: Managing Secret using Configuration File
8+
title: Managing Secrets using Configuration File
99
content_type: task
1010
weight: 20
1111
description: Creating Secret objects using resource configuration file.
@@ -259,8 +259,8 @@ kubectl delete secret mysecret
259259

260260
<!--
261261
- Read more about the [Secret concept](/docs/concepts/configuration/secret/)
262-
- Learn how to [manage Secret with the `kubectl` command](/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
263-
- Learn how to [manage Secret using kustomize](/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
262+
- Learn how to [manage Secrets with the `kubectl` command](/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
263+
- Learn how to [manage Secrets using kustomize](/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
264264
-->
265265
- 进一步阅读 [Secret 概念](/zh/docs/concepts/configuration/secret/)
266266
- 了解如何[使用 `kubectl` 命令管理 Secret](/zh/docs/tasks/configmap-secret/managing-secret-using-kubectl/)

content/zh/docs/tasks/configmap-secret/managing-secret-using-kustomize.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 30
55
description: 使用 kustomization.yaml 文件创建 Secret 对象。
66
---
77
<!--
8-
title: Managing Secret using Kustomize
8+
title: Managing Secrets using Kustomize
99
content_type: task
1010
weight: 30
1111
description: Creating Secret objects using kustomization.yaml file.
@@ -184,8 +184,8 @@ kubectl delete secret db-user-pass-96mffmfh4k
184184

185185
<!--
186186
- Read more about the [Secret concept](/docs/concepts/configuration/secret/)
187-
- Learn how to [manage Secret with the `kubectl` command](/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
188-
- Learn how to [manage Secret using config file](/docs/tasks/configmap-secret/managing-secret-using-config-file/)
187+
- Learn how to [manage Secrets with the `kubectl` command](/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
188+
- Learn how to [manage Secrets using config file](/docs/tasks/configmap-secret/managing-secret-using-config-file/)
189189
-->
190190
- 进一步阅读 [Secret 概念](/zh/docs/concepts/configuration/secret/)
191191
- 了解如何[使用 `kubectl` 命令管理 Secret](/zh/docs/tasks/configmap-secret/managing-secret-using-kubectl/)

content/zh/docs/tasks/extend-kubernetes/configure-aggregation-layer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ Kubernetes API 的一部分。
2727
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
2828

2929
<!--
30-
There are a few setup requirements for getting the aggregation layer working in your environment to support mutual TLS auth between the proxy and extension apiservers. Kubernetes and the kube-apiserver have multiple CAs, so make sure that the proxy is signed by the aggregation layer CA and not by something else, like the master CA.
30+
There are a few setup requirements for getting the aggregation layer working in your environment to support mutual TLS auth between the proxy and extension apiservers. Kubernetes and the kube-apiserver have multiple CAs, so make sure that the proxy is signed by the aggregation layer CA and not by something else, like the Kubernetes general CA.
3131
-->
3232
{{< note >}}
3333
要使聚合层在你的环境中正常工作以支持代理服务器和扩展 apiserver 之间的相互 TLS 身份验证,
3434
需要满足一些设置要求。Kubernetes 和 kube-apiserver 具有多个 CA,
35-
因此请确保代理是由聚合层 CA 签名的,而不是由主 CA 签名的。
35+
因此请确保代理是由聚合层 CA 签名的,而不是由 Kubernetes 通用 CA 签名的。
3636
{{< /note >}}
3737

3838
<!--

content/zh/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,22 +269,26 @@ from the YAML you used to create it:
269269

270270
```yaml
271271
apiVersion: v1
272-
kind: List
273272
items:
274273
- apiVersion: stable.example.com/v1
275274
kind: CronTab
276275
metadata:
277-
creationTimestamp: 2017-05-31T12:56:35Z
276+
annotations:
277+
kubectl.kubernetes.io/last-applied-configuration: |
278+
{"apiVersion":"stable.example.com/v1","kind":"CronTab","metadata":{"annotations":{},"name":"my-new-cron-object","namespace":"default"},"spec":{"cronSpec":"* * * * */5","image":"my-awesome-cron-image"}}
279+
creationTimestamp: "2021-06-20T07:35:27Z"
278280
generation: 1
279281
name: my-new-cron-object
280282
namespace: default
281-
resourceVersion: "285"
282-
uid: 9423255b-4600-11e7-af6a-28d2447dc82b
283+
resourceVersion: "1326"
284+
uid: 9aab1d66-628e-41bb-a422-57b8b3b1f5a9
283285
spec:
284286
cronSpec: '* * * * */5'
285287
image: my-awesome-cron-image
288+
kind: List
286289
metadata:
287290
resourceVersion: ""
291+
selfLink: ""
288292
```
289293
290294
<!--

content/zh/docs/tasks/manage-daemon/update-daemon-set.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ This page shows how to perform a rolling update on a DaemonSet.
1919

2020
## {{% heading "prerequisites" %}}
2121

22-
<!--
23-
* The DaemonSet rolling update feature is only supported in Kubernetes version 1.6 or later.
24-
-->
25-
* Kubernetes 1.6 或者更高版本中才支持 DaemonSet 滚动更新功能。
22+
{{< include "task-tutorial-prereqs.md" >}}
2623

2724
<!-- steps -->
2825

@@ -36,20 +33,20 @@ DaemonSet has two update strategy types:
3633
DaemonSet 有两种更新策略:
3734

3835
<!--
39-
* OnDelete: With `OnDelete` update strategy, after you update a DaemonSet template, new
36+
* `OnDelete`: With `OnDelete` update strategy, after you update a DaemonSet template, new
4037
DaemonSet pods will *only* be created when you manually delete old DaemonSet
4138
pods. This is the same behavior of DaemonSet in Kubernetes version 1.5 or
4239
before.
43-
* RollingUpdate: This is the default update strategy.
40+
* `RollingUpdate`: This is the default update strategy.
4441
With `RollingUpdate` update strategy, after you update a
4542
DaemonSet template, old DaemonSet pods will be killed, and new DaemonSet pods
4643
will be created automatically, in a controlled fashion.
4744
At most one pod of the DaemonSet will be running on each node during the whole update process.
4845
-->
4946

50-
* OnDelete: 使用 `OnDelete` 更新策略时,在更新 DaemonSet 模板后,只有当你手动删除老的
47+
* `OnDelete`: 使用 `OnDelete` 更新策略时,在更新 DaemonSet 模板后,只有当你手动删除老的
5148
DaemonSet pods 之后,新的 DaemonSet Pod *才会*被自动创建。跟 Kubernetes 1.6 以前的版本类似。
52-
* RollingUpdate: 这是默认的更新策略。使用 `RollingUpdate` 更新策略时,在更新 DaemonSet 模板后,
49+
* `RollingUpdate`: 这是默认的更新策略。使用 `RollingUpdate` 更新策略时,在更新 DaemonSet 模板后,
5350
老的 DaemonSet pods 将被终止,并且将以受控方式自动创建新的 DaemonSet pods。
5451
更新期间,最多只能有 DaemonSet 的一个 Pod 运行于每个节点上。
5552

@@ -64,12 +61,18 @@ To enable the rolling update feature of a DaemonSet, you must set its
6461
要启用 DaemonSet 的滚动更新功能,必须设置 `.spec.updateStrategy.type``RollingUpdate`
6562

6663
<!--
67-
You may want to set [`.spec.updateStrategy.rollingUpdate.maxUnavailable`](/docs/concepts/workloads/controllers/deployment/#max-unavailable) (default
68-
to 1) and [`.spec.minReadySeconds`](/docs/concepts/workloads/controllers/deployment/#min-ready-seconds) (default to 0) as well.
64+
You may want to set
65+
[`.spec.updateStrategy.rollingUpdate.maxUnavailable`](/docs/concepts/workloads/controllers/deployment/#max-unavailable)
66+
(default to 1),
67+
[`.spec.minReadySeconds`](/docs/concepts/workloads/controllers/deployment/#min-ready-seconds)
68+
(default to 0) and
69+
[`.spec.maxSurge`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#max-surge)
70+
(a beta feature and defaults to 25%) as well.
6971
-->
7072
你可能想设置
71-
[`.spec.updateStrategy.rollingUpdate.maxUnavailable`](/zh/docs/concepts/workloads/controllers/deployment/#max-unavailable) (默认为 1) 和
72-
[`.spec.minReadySeconds`](/zh/docs/concepts/workloads/controllers/deployment/#min-ready-seconds) (默认为 0)。
73+
[`.spec.updateStrategy.rollingUpdate.maxUnavailable`](/zh/docs/concepts/workloads/controllers/deployment/#max-unavailable) (默认为 1),
74+
[`.spec.minReadySeconds`](/zh/docs/concepts/workloads/controllers/deployment/#min-ready-seconds) (默认为 0) 和
75+
[`.spec.maxSurge`](/zh/docs/concepts/workloads/controllers/deployment/#max-surge) (一种 Beta 阶段的特性,默认为 25%)
7376

7477
<!--
7578
### Creating a DaemonSet with `RollingUpdate` update strategy
@@ -248,13 +251,13 @@ causes:
248251
<!--
249252
The rollout is stuck because new DaemonSet pods can't be scheduled on at least one
250253
node. This is possible when the node is
251-
[running out of resources](/docs/tasks/administer-cluster/out-of-resource/).
254+
[running out of resources](/docs/concepts/scheduling-eviction/node-pressure-eviction/).
252255
253256
When this happens, find the nodes that don't have the DaemonSet pods scheduled on
254257
by comparing the output of `kubectl get nodes` and the output of:
255258
-->
256259
DaemonSet 滚动更新可能会卡住,其 Pod 至少在某个节点上无法调度运行。
257-
当节点上[可用资源耗尽](/zh/docs/tasks/administer-cluster/out-of-resource/)时,
260+
当节点上[可用资源耗尽](/zh/docs/concepts/scheduling-eviction/node-pressure-eviction/)时,
258261
这是可能的。
259262

260263
发生这种情况时,通过对 `kubectl get nodes` 和下面命令行的输出作比较,
@@ -328,10 +331,9 @@ kubectl delete ds fluentd-elasticsearch -n kube-system
328331
## {{% heading "whatsnext" %}}
329332

330333
<!--
331-
* See [Task: Performing a rollback on a
332-
DaemonSet](/docs/tasks/manage-daemon/rollback-daemon-set/)
333-
* See [Concepts: Creating a DaemonSet to adopt existing DaemonSet pods](/docs/concepts/workloads/controllers/daemonset/)
334+
* See [Performing a rollback on a DaemonSet](/docs/tasks/manage-daemon/rollback-daemon-set/)
335+
* See [Creating a DaemonSet to adopt existing DaemonSet pods](/docs/concepts/workloads/controllers/daemonset/)
334336
-->
335-
* 查看[任务:在 DaemonSet 上执行回滚](/zh/docs/tasks/manage-daemon/rollback-daemon-set/)
336-
* 查看[概念:创建 DaemonSet 以收养现有 DaemonSet Pod](/zh/docs/concepts/workloads/controllers/daemonset/)
337+
* 查看[在 DaemonSet 上执行回滚](/zh/docs/tasks/manage-daemon/rollback-daemon-set/)
338+
* 查看[创建 DaemonSet 以收养现有 DaemonSet Pod](/zh/docs/concepts/workloads/controllers/daemonset/)
337339

content/zh/docs/tasks/tls/certificate-rotation.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ Kubelet 使用证书进行 Kubernetes API 的认证。
4040
默认情况下,这些证书的签发期限为一年,所以不需要太频繁地进行更新。
4141

4242
<!--
43-
Kubernetes 1.8 contains [kubelet certificate
44-
rotation](/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/), a beta feature
43+
Kubernetes contains [kubelet certificate
44+
rotation](/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/),
4545
that will automatically generate a new key and request a new certificate from
4646
the Kubernetes API as the current certificate approaches expiration. Once the
4747
new certificate is available, it will be used for authenticating connections to
4848
the Kubernetes API.
4949
-->
50-
Kubernetes 1.8 版本中包含 beta 特性
50+
Kubernetes 包含特性
5151
[kubelet 证书轮换](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)
5252
在当前证书即将过期时,
5353
将自动生成新的秘钥,并从 Kubernetes API 申请新的证书。 一旦新的证书可用,它将被用于与
@@ -99,7 +99,7 @@ criteria, it will be auto approved by the controller manager, then it will have
9999
a status of `Approved`. Next, the controller manager will sign a certificate,
100100
issued for the duration specified by the
101101
`--cluster-signing-duration` parameter, and the signed certificate
102-
will be attached to the certificate signing requests.
102+
will be attached to the certificate signing request.
103103
-->
104104
最初,来自节点上 kubelet 的证书签名请求处于 `Pending` 状态。 如果证书签名请求满足特定条件,
105105
控制器管理器会自动批准,此时请求会处于 `Approved` 状态。 接下来,控制器管理器会签署证书,
@@ -116,14 +116,16 @@ Kubelet 会从 Kubernetes API 取回签署的证书,并将其写入磁盘,
116116

117117
<!--
118118
As the expiration of the signed certificate approaches, the kubelet will
119-
automatically issue a new certificate signing request, using the Kubernetes
120-
API. Again, the controller manager will automatically approve the certificate
119+
automatically issue a new certificate signing request, using the Kubernetes API.
120+
This can happen at any point between 30% and 10% of the time remaining on the
121+
certificate. Again, the controller manager will automatically approve the certificate
121122
request and attach a signed certificate to the certificate signing request. The
122123
kubelet will retrieve the new signed certificate from the Kubernetes API and
123124
write that to disk. Then it will update the connections it has to the
124125
Kubernetes API to reconnect using the new certificate.
125126
-->
126-
当签署的证书即将到期时,kubelet 会使用 Kubernetes API,发起新的证书签名请求。
127+
当签署的证书即将到期时,kubelet 会使用 Kubernetes API,自动发起新的证书签名请求。
128+
该请求会发生在证书的有效时间剩下 30% 到 10% 之间的任意时间点。
127129
同样地,控制器管理器会自动批准证书请求,并将签署的证书附加到证书签名请求中。 Kubelet
128130
会从 Kubernetes API 取回签署的证书,并将其写入磁盘。 然后它会更新与 Kubernetes API
129131
的连接,使用新的证书重新连接到 Kubernetes API。

0 commit comments

Comments
 (0)