Skip to content

Commit 93b6876

Browse files
author
huangminjie
committed
[zh] sync v1.24 concepts/workloads/controllers/statefulset.md
1 parent 7ac42d2 commit 93b6876

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

content/zh/docs/concepts/workloads/controllers/statefulset.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,9 @@ in the same order as Pod termination (from the largest ordinal to the smallest),
477477
each Pod one at a time.
478478

479479
The Kubernetes control plane waits until an updated Pod is Running and Ready prior
480-
to updating its predecessor. If you have set `.spec.minReadySeconds` (see [Minimum Ready Seconds](#minimum-ready-seconds)), the control plane additionally waits that amount of time after the Pod turns ready, before moving on.
480+
to updating its predecessor. If you have set `.spec.minReadySeconds` (see
481+
[Minimum Ready Seconds](#minimum-ready-seconds)), the control plane additionally waits that
482+
amount of time after the Pod turns ready, before moving on.
481483
-->
482484
## 滚动更新 {#rolling-updates}
483485

@@ -513,6 +515,47 @@ update, roll out a canary, or perform a phased roll out.
513515
在大多数情况下,你不需要使用分区,但如果你希望进行阶段更新、执行金丝雀或执行
514516
分阶段上线,则这些分区会非常有用。
515517

518+
<!--
519+
### Maximum unavailable Pods
520+
-->
521+
### 最大不可用 Pod
522+
523+
{{< feature-state for_k8s_version="v1.24" state="alpha" >}}
524+
525+
<!--
526+
You can control the maximum number of Pods that can be unavailable during an update
527+
by specifying the `.spec.updateStrategy.rollingUpdate.maxUnavailable` field.
528+
The value can be an absolute number (for example, `5`) or a percentage of desired
529+
Pods (for example, `10%`). Absolute number is calculated from the percentage value
530+
by rounding it up. This field cannot be 0. The default setting is 1.
531+
-->
532+
你可以通过指定 `.spec.updateStrategy.rollingUpdate.maxUnavailable`
533+
字段来控制更新期间不可用的 Pod 的最大数量。
534+
该值可以是绝对值(例如,“5”)或者是期望 Pod 个数的百分比(例如,`10%`)。
535+
绝对值是根据百分比值四舍五入计算的。
536+
该字段不能为 0。默认设置为 1。
537+
538+
<!--
539+
This field applies to all Pods in the range `0` to `replicas - 1`. If there is any
540+
unavailable Pod in the range `0` to `replicas - 1`, it will be counted towards
541+
`maxUnavailable`.
542+
-->
543+
该字段适用于 `0` 到 `replicas - 1` 范围内的所有 Pod。
544+
如果在 `0` 到 `replicas - 1` 范围内存在不可用 Pod,这类 Pod 将被计入 `maxUnavailable` 值。
545+
546+
<!--
547+
{{< note >}}
548+
The `maxUnavailable` field is in Alpha stage and it is honored only by API servers
549+
that are running with the `MaxUnavailableStatefulSet`
550+
[feature gate](/docs/reference/commmand-line-tools-reference/feature-gates/)
551+
enabled.
552+
{{< /note >}}
553+
-->
554+
{{< note >}}
555+
`maxUnavailable` 字段处于 Alpha 阶段,仅当 API 服务器启用了 `MaxUnavailableStatefulSet`
556+
[特性门控](/zh/docs/reference/commmand-line-tools-reference/feature-gates/)时才起作用。
557+
{{< /note >}}
558+
516559
<!--
517560
### Forced Rollback
518561

0 commit comments

Comments
 (0)