KEP-3335 StatefulSetSlice Documentation
parent
e11d51afdc
commit
57c0c1a3d6
|
@ -437,6 +437,20 @@ Statefulset, don't set `.spec.replicas`. Instead, allow the Kubernetes
|
|||
{{<glossary_tooltip text="control plane" term_id="control-plane" >}} to manage
|
||||
the `.spec.replicas` field automatically.
|
||||
|
||||
### Ordinals
|
||||
|
||||
{{< feature-state for_k8s_version="v1.26" state="alpha" >}}
|
||||
|
||||
`.spec.ordinals` is an optional field that allows for configuration of the replica numbers assigned
|
||||
to pods. It defaults to nil. You must enable the `StatefulSetSlice`
|
||||
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to use this field. Once
|
||||
enabled, you can configure the following options:
|
||||
|
||||
* `.spec.ordinals.start`: By default, the StatefulSet controller creates replica pods ordered from
|
||||
`0` to `.spec.replicas-1`. If the `.spec.ordinals.start` field is set, the StatefulSet controller
|
||||
will create replica pods ordered from `.spec.ordinals.start` to
|
||||
`.spec.ordinals.start + .spec.replicas - 1`.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
* Learn about [Pods](/docs/concepts/workloads/pods).
|
||||
|
|
|
@ -131,6 +131,11 @@ Notice that the `web-1` Pod is not launched until the `web-0` Pod is
|
|||
_Running_ (see [Pod Phase](/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase))
|
||||
and _Ready_ (see `type` in [Pod Conditions](/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions)).
|
||||
|
||||
#### Custom replica numbering
|
||||
|
||||
Note: To customize the replica numbering of pods in a StatefulSet, see
|
||||
[Ordinals](docs/tutorials/stateful-application/basic-stateful-set/#ordinals).
|
||||
|
||||
## Pods in a StatefulSet
|
||||
|
||||
Pods in a StatefulSet have a unique ordinal index and a stable network identity.
|
||||
|
|
Loading…
Reference in New Issue