Skip to content

Commit

Permalink
[zh] sync stateful-set-v1.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Michelle951 committed Sep 13, 2022
1 parent eb82e6e commit a5e0bb5
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ auto_generated: true
StatefulSet represents a set of pods with consistent identities. Identities are defined as:
- Network: A single stable DNS and hostname.
- Storage: As many VolumeClaims as requested.
The StatefulSet guarantees that a given network identity will always map to the same storage identity.
-->
StatefulSet 表示一组具有一致身份的 Pod。身份定义为:
- 网络:一个稳定的 DNS 和主机名。
- 存储:根据要求提供尽可能多的 VolumeClaims。
- 存储:根据要求提供尽可能多的 VolumeClaim。

StatefulSet 保证给定的网络身份将始终映射到相同的存储身份。
<hr>

Expand Down Expand Up @@ -81,7 +83,7 @@ StatefulSetSpec 是 StatefulSet 的规约。
- **serviceName** (string), 必需

serviceName 是管理此 StatefulSet 服务的名称。
该服务必须在 StatefulSet 之前即已存在,并负责该集合的网络标识。
该服务必须在 StatefulSet 之前即已存在,并负责该集合的网络标识。
Pod 会获得符合以下模式的 DNS/主机名: pod-specific-string.serviceName.default.svc.cluster.local。
其中 “pod-specific-string” 由 StatefulSet 控制器管理。

Expand All @@ -93,7 +95,7 @@ StatefulSetSpec 是 StatefulSet 的规约。
- **selector** (<a href="{{< ref "../common-definitions/label-selector#LabelSelector" >}}">LabelSelector</a>), 必需

selector 是对 Pod 的标签查询,查询结果应该匹配副本个数。
此选择算符必须与 Pod 模板中的 labels 匹配。
此选择算符必须与 Pod 模板中的 label 匹配。
更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors

<!--
Expand All @@ -103,7 +105,7 @@ StatefulSetSpec 是 StatefulSet 的规约。
-->
- **template** (<a href="{{< ref "../workload-resources/pod-template-v1#PodTemplateSpec" >}}">PodTemplateSpec</a>), 必需

template 是用来描述 Pod 的对象,检测到副本不足时将创建所描述的 Pod。
template 是用来描述 Pod 的对象,检测到副本不足时将创建所描述的 Pod。
经由 StatefulSet 创建的每个 Pod 都将满足这个模板,但与 StatefulSet 的其余 Pod 相比,每个 Pod 具有唯一的标识。

<!--
Expand Down Expand Up @@ -136,6 +138,11 @@ StatefulSetSpec 是 StatefulSet 的规约。

- **updateStrategy.type** (string)

<!--
Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.
-->
type 表示 StatefulSetUpdateStrategy 的类型,默认为 RollingUpdate。

- **updateStrategy.rollingUpdate** (RollingUpdateStatefulSetStrategy)

<!--
Expand Down Expand Up @@ -218,12 +225,11 @@ StatefulSetSpec 是 StatefulSet 的规约。
- **minReadySeconds** (int32)

<!--
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)
-->

新创建的 Pod 应准备就绪(其任何容器都未崩溃)的最小秒数,以使其被视为可用。
默认为 0(Pod 准备就绪后将被视为可用)。
这是一个 Alpha 字段,需要启用 StatefulSetMinReadySeconds 特性门控。

- **persistentVolumeClaimRetentionPolicy** (StatefulSetPersistentVolumeClaimRetentionPolicy)

Expand Down Expand Up @@ -304,10 +310,9 @@ StatefulSetStatus 表示 StatefulSet 的当前状态。
- **availableReplicas** (int32)

<!--
Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.
Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset.
-->
此 StatefulSet 所对应的可用 Pod 总数(就绪时长至少为 minReadySeconds)。
这是一个 Beta 字段,由 StatefulSetMinReadySeconds 特性门控启用/禁用。

- **collisionCount** (int32)

Expand Down

0 comments on commit a5e0bb5

Please sign in to comment.