You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`.spec.minReadySeconds`is an optional field that specifies the minimum number of seconds for which a newly
236
-
created Pod should be ready without any of its containers crashing, for it to be considered available.
237
-
This defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when
238
-
a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
232
+
## Update strategies
239
233
240
-
Please note that this field only works if you enable the `StatefulSetMinReadySeconds` feature gate.
241
-
## Update Strategies
242
-
243
-
In Kubernetes 1.7 and later, StatefulSet's `.spec.updateStrategy` field allows you to configure
234
+
A StatefulSet's `.spec.updateStrategy` field allows you to configure
244
235
and disable automated rolling updates for containers, labels, resource request/limits, and
245
-
annotations for the Pods in a StatefulSet.
236
+
annotations for the Pods in a StatefulSet. There are two possible values:
246
237
247
-
### On Delete
238
+
`OnDelete`
239
+
: When a StatefulSet's `.spec.updateStrategy.type` is set to `OnDelete`,
240
+
the StatefulSet controller will not automatically update the Pods in a
241
+
StatefulSet. Users must manually delete Pods to cause the controller to
242
+
create new Pods that reflect modifications made to a StatefulSet's `.spec.template`.
248
243
249
-
The `OnDelete` update strategy implements the legacy (1.6 and prior) behavior. When a StatefulSet's
250
-
`.spec.updateStrategy.type`is set to `OnDelete`, the StatefulSet controller will not automatically
251
-
update the Pods in a StatefulSet. Users must manually delete Pods to cause the controller to
252
-
create new Pods that reflect modifications made to a StatefulSet's `.spec.template`.
244
+
`RollingUpdate`
245
+
: The `RollingUpdate` update strategy implements automated, rolling update for the Pods in a StatefulSet. This is the default update strategy.
253
246
254
-
### Rolling Updates
247
+
## Rolling Updates
255
248
256
-
The `RollingUpdate` update strategy implements automated, rolling update for the Pods in a
257
-
StatefulSet. It is the default strategy when `.spec.updateStrategy` is left unspecified. When a StatefulSet's `.spec.updateStrategy.type` is set to `RollingUpdate`, the
249
+
When a StatefulSet's `.spec.updateStrategy.type` is set to `RollingUpdate`, the
258
250
StatefulSet controller will delete and recreate each Pod in the StatefulSet. It will proceed
259
251
in the same order as Pod termination (from the largest ordinal to the smallest), updating
260
-
each Pod one at a time. It will wait until an updated Pod is Running and Ready prior to
261
-
updating its predecessor.
252
+
each Pod one at a time.
253
+
254
+
The Kubernetes control plane waits until an updated Pod is Running and Ready prior
255
+
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.
262
256
263
-
#### Partitions
257
+
### Partitioned rolling updates {#partitions}
264
258
265
259
The `RollingUpdate` update strategy can be partitioned, by specifying a
266
260
`.spec.updateStrategy.rollingUpdate.partition`. If a partition is specified, all Pods with an
@@ -272,7 +266,7 @@ updates to its `.spec.template` will not be propagated to its Pods.
272
266
In most cases you will not need to use a partition, but they are useful if you want to stage an
273
267
update, roll out a canary, or perform a phased roll out.
274
268
275
-
#### Forced Rollback
269
+
### Forced rollback
276
270
277
271
When using [Rolling Updates](#rolling-updates) with the default
`.spec.minReadySeconds`is an optional field that specifies the minimum number of seconds for which a newly
294
+
created Pod should be ready without any of its containers crashing, for it to be considered available.
295
+
This defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when
296
+
a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
297
+
298
+
Please note that this field only works if you enable the `StatefulSetMinReadySeconds` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
0 commit comments