Skip to content

Commit 5f6b1df

Browse files
authored
Merge pull request #44872 from my-git9/patch-8
[zh-cn]improve deployment.md
2 parents 9066015 + db158fd commit 5f6b1df

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

content/zh-cn/docs/concepts/workloads/controllers/deployment.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ Deployment 控制器将 `pod-template-hash` 标签添加到 Deployment
320320
This label ensures that child ReplicaSets of a Deployment do not overlap. It is generated by hashing the `PodTemplate` of the ReplicaSet and using the resulting hash as the label value that is added to the ReplicaSet selector, Pod template labels,
321321
and in any existing Pods that the ReplicaSet might have.
322322
-->
323-
此标签可确保 Deployment 的子 ReplicaSets 不重叠。
323+
此标签可确保 Deployment 的子 ReplicaSet 不重叠。
324324
标签是通过对 ReplicaSet 的 `PodTemplate` 进行哈希处理。
325325
所生成的哈希值被添加到 ReplicaSet 选择算符、Pod 模板标签,并存在于在 ReplicaSet
326326
可能拥有的任何现有 Pod 中。
@@ -606,15 +606,15 @@ ReplicaSet is scaled to `.spec.replicas` and all old ReplicaSets is scaled to 0.
606606
Deployment 控制器每次注意到新的 Deployment 时,都会创建一个 ReplicaSet 以启动所需的 Pod。
607607
如果更新了 Deployment,则控制标签匹配 `.spec.selector` 但模板不匹配 `.spec.template` 的 Pod 的现有 ReplicaSet 被缩容。
608608
最终,新的 ReplicaSet 缩放为 `.spec.replicas` 个副本,
609-
所有旧 ReplicaSets 缩放为 0 个副本。
609+
所有旧 ReplicaSet 缩放为 0 个副本。
610610

611611
<!--
612612
If you update a Deployment while an existing rollout is in progress, the Deployment creates a new ReplicaSet
613613
as per the update and start scaling that up, and rolls over the ReplicaSet that it was scaling up previously
614614
-- it will add it to its list of old ReplicaSets and start scaling it down.
615615
-->
616616
当 Deployment 正在上线时被更新,Deployment 会针对更新创建一个新的 ReplicaSet
617-
并开始对其扩容,之前正在被扩容的 ReplicaSet 会被翻转,添加到旧 ReplicaSets 列表
617+
并开始对其扩容,之前正在被扩容的 ReplicaSet 会被翻转,添加到旧 ReplicaSet 列表
618618
并开始缩容。
619619

620620
<!--
@@ -1122,7 +1122,7 @@ ReplicaSets (ReplicaSets with Pods) in order to mitigate risk. This is called *p
11221122

11231123
RollingUpdate 的 Deployment 支持同时运行应用程序的多个版本。
11241124
当自动缩放器缩放处于上线进程(仍在进行中或暂停)中的 RollingUpdate Deployment 时,
1125-
Deployment 控制器会平衡现有的活跃状态的 ReplicaSets(含 Pod 的 ReplicaSets)中的额外副本,
1125+
Deployment 控制器会平衡现有的活跃状态的 ReplicaSet(含 Pod 的 ReplicaSet)中的额外副本,
11261126
以降低风险。这称为 *比例缩放(Proportional Scaling)*
11271127

11281128
<!--
@@ -1202,7 +1202,7 @@ ReplicaSet with the most replicas. ReplicaSets with zero replicas are not scaled
12021202
都将添加到新的 ReplicaSet 中。使用比例缩放时,可以将额外的副本分布到所有 ReplicaSet。
12031203
较大比例的副本会被添加到拥有最多副本的 ReplicaSet,而较低比例的副本会进入到
12041204
副本较少的 ReplicaSet。所有剩下的副本都会添加到副本最多的 ReplicaSet。
1205-
具有零副本的 ReplicaSets 不会被扩容。
1205+
具有零副本的 ReplicaSet 不会被扩容。
12061206

12071207
<!--
12081208
In our example above, 3 replicas are added to the old ReplicaSet and 2 replicas are added to the
@@ -2094,8 +2094,8 @@ the rolling update process.
20942094
#### 滚动更新 Deployment {#rolling-update-deployment}
20952095

20962096
Deployment 会在 `.spec.strategy.type==RollingUpdate`时,采取
2097-
滚动更新的方式更新 Pod。你可以指定 `maxUnavailable``maxSurge` 来控制滚动更新
2098-
过程
2097+
滚动更新的方式更新 Pod。你可以指定 `maxUnavailable``maxSurge`
2098+
来控制滚动更新过程
20992099

21002100
<!--
21012101
##### Max Unavailable
@@ -2108,8 +2108,8 @@ of Pods that can be unavailable during the update process. The value can be an a
21082108
or a percentage of desired Pods (for example, 10%). The absolute number is calculated from percentage by
21092109
rounding down. The value cannot be 0 if `.spec.strategy.rollingUpdate.maxSurge` is 0. The default value is 25%.
21102110
-->
2111-
`.spec.strategy.rollingUpdate.maxUnavailable` 是一个可选字段,用来指定
2112-
更新过程中不可用的 Pod 的个数上限。该值可以是绝对数字(例如,5),也可以是所需
2111+
`.spec.strategy.rollingUpdate.maxUnavailable` 是一个可选字段,
2112+
用来指定更新过程中不可用的 Pod 的个数上限。该值可以是绝对数字(例如,5),也可以是所需
21132113
Pod 的百分比(例如,10%)。百分比值会转换成绝对数并去除小数部分。
21142114
如果 `.spec.strategy.rollingUpdate.maxSurge` 为 0,则此值不能为 0。
21152115
默认值为 25%。
@@ -2263,7 +2263,7 @@ controller will roll back a Deployment as soon as it observes such a condition.
22632263
### 进度期限秒数 {#progress-deadline-seconds}
22642264

22652265
`.spec.progressDeadlineSeconds` 是一个可选字段,用于指定系统在报告 Deployment
2266-
[进展失败](#failed-deployment) 之前等待 Deployment 取得进展的秒数。
2266+
[进展失败](#failed-deployment)之前等待 Deployment 取得进展的秒数。
22672267
这类报告会在资源状态中体现为 `type: Progressing`、`status: False`、
22682268
`reason: ProgressDeadlineExceeded`。Deployment 控制器将在默认 600 毫秒内持续重试 Deployment。
22692269
将来,一旦实现了自动回滚,Deployment 控制器将在探测到这样的条件时立即回滚 Deployment。
@@ -2296,7 +2296,7 @@ A Deployment's revision history is stored in the ReplicaSets it controls.
22962296
-->
22972297
### 修订历史限制
22982298

2299-
Deployment 的修订历史记录存储在它所控制的 ReplicaSets 中。
2299+
Deployment 的修订历史记录存储在它所控制的 ReplicaSet 中。
23002300

23012301
<!--
23022302
`.spec.revisionHistoryLimit` is an optional field that specifies the number of old ReplicaSets to retain
@@ -2307,7 +2307,7 @@ however its ideal value depends on the frequency and stability of new Deployment
23072307
-->
23082308
`.spec.revisionHistoryLimit` 是一个可选字段,用来设定出于回滚目的所要保留的旧 ReplicaSet 数量。
23092309
这些旧 ReplicaSet 会消耗 etcd 中的资源,并占用 `kubectl get rs` 的输出。
2310-
每个 Deployment 修订版本的配置都存储在其 ReplicaSets 中;因此,一旦删除了旧的 ReplicaSet,
2310+
每个 Deployment 修订版本的配置都存储在其 ReplicaSet 中;因此,一旦删除了旧的 ReplicaSet,
23112311
将失去回滚到 Deployment 的对应修订版本的能力。
23122312
默认情况下,系统保留 10 个旧 ReplicaSet,但其理想值取决于新 Deployment 的频率和稳定性。
23132313

0 commit comments

Comments
 (0)