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
title: "sig-apps features graduating to stable in 1.25"
3
+
title: "SIG Apps Features Graduating to Stable in Kubernetes 1.25"
4
4
date: 2022-09-15
5
-
slug: "sig-appsfeatures graduating to stable in 1.25"
5
+
slug: "sig-apps-features-stable-1-25"
6
6
---
7
7
8
8
**Authors:** Ravi Gudimetla (Apple), Filip Křepinský (Red Hat), Maciej Szulik (Red Hat)
9
9
10
-
This blog describes the two features namely `minReadySeconds` for StatefulSets and `maxSurge` for DaemonSets that sig-apps is happy to graduate to stable in 1.25.
10
+
This blog describes the two features namely `minReadySeconds` for StatefulSets and `maxSurge` for DaemonSets that SIG Apps is happy to graduate to stable in Kubernetes 1.25.
11
11
12
12
Specifying `minReadySeconds` slows down a rollout of a StatefulSet, when using a `RollingUpdate` value in `.spec.updateStrategy` field, by waiting for each pod for a desired time.
13
13
This time can be used for initializing the pod (e.g. warming up the cache) or as a delay before acknowledging the pod.
14
14
15
15
`maxSurge` allows a DaemonSet workload to run multiple instances of the same pod on a node during a rollout when using a `RollingUpdate` value in `.spec.updateStrategy` field.
16
16
This helps to minimize the downtime of the DaemonSet for consumers.
17
17
18
-
These features are already available in a Deployment and other workloads. This graduation helps to align this functionality across the workloads.
18
+
These features were already available in a Deployment and other workloads. This graduation helps to align this functionality across the workloads.
19
19
20
20
## What problems do these features solve?
21
21
22
-
### MinReadySeconds for StatefulSets
22
+
### minReadySeconds for StatefulSets {#solved-problem-statefulset-minreadyseconds}
23
23
`minReadySeconds` ensures that the StatefulSet workload is `Ready` for the given number of seconds before reporting the
24
24
pod as `Available`. The notion of being `Ready` and `Available` is quite important for workloads. For example, some workloads, like Prometheus with multiple instances of Alertmanager, should be considered `Available` only when the Alertmanager's state transfer is complete. `minReadySeconds` also helps when using loadbalancers with cloud providers. Since the pod should be `Ready` for the given number of seconds, it provides buffer time to prevent killing pods in rotation before new pods show up.
25
25
26
26
27
-
### MaxSurge for DaemonSets
27
+
### maxSurge for DaemonSets {#how-use-daemonset-maxsurge}
28
28
Kubernetes system-level components like CNI, CSI are typically run as DaemonSets. These components can have impact on the availability of the workloads if those DaemonSets go down momentarily during the upgrades. The feature allows DaemonSet pods to temporarily increase their number, thereby ensuring zero-downtime for the DaemonSets.
29
29
30
-
Please note that the usage of `HostPort` in conjunction with `MaxSurge` in DaemonSets is not allowed as DaemonSet pods are tied to a single node and two active pods cannot share the same port on the same node.
30
+
Please note that the usage of `hostPort` in conjunction with `maxSurge` in DaemonSets is not allowed as DaemonSet pods are tied to a single node and two active pods cannot share the same port on the same node.
31
31
32
32
33
33
## How does it work?
34
34
35
-
### MinReadySeconds for StatefulSets
35
+
### minReadySeconds for StatefulSets {#how-does-statefulset-minreadyseconds-work}
36
36
37
37
The StatefulSet controller watches for the StatefulSet pods and counts how long a particular pod has been in the `Running` state, if this value is greater than or equal to the time specified in `.spec.minReadySeconds` field of the StatefulSet, the StatefulSet controller updates the `AvailableReplicas` field in the StatefulSet's status.
38
38
39
39
40
-
### MaxSurge for DaemonSets
40
+
### maxSurge for DaemonSets {#how-does-daemonset-maxsurge-work}
41
41
42
42
The DaemonSet controller creates the additional pods (above the desired number resulting from DaemonSet spec) based on the value given in `.spec.strategy.rollingUpdate.maxSurge`. The additional pods would run on the same node where the old DaemonSet pod is running till the old pod gets killed.
43
43
@@ -47,7 +47,7 @@ The DaemonSet controller creates the additional pods (above the desired number r
47
47
48
48
## How do I use it?
49
49
50
-
### MinReadySeconds for StatefulSets
50
+
### minReadySeconds for StatefulSets {#how-use-statefulset-minreadyseconds}
51
51
52
52
Specify a value for `minReadySeconds` for any StatefulSet and check if pods are available or not by inspecting
53
53
`AvailableReplicas` field using:
@@ -56,7 +56,7 @@ Specify a value for `minReadySeconds` for any StatefulSet and check if pods are
56
56
57
57
Please note that the default value of `minReadySeconds` is 0.
58
58
59
-
### MaxSurge for DaemonSets
59
+
### maxSurge for DaemonSets {#how-use-daemonset-maxsurge}
60
60
61
61
Specify a value for `.spec.updateStrategy.rollingUpdate.maxSurge` and set `.spec.updateStrategy.rollingUpdate.maxUnavailable` to `0`.
62
62
@@ -69,16 +69,18 @@ kubectl get pods -w
69
69
70
70
## How can I learn more?
71
71
72
-
### MinReadySeconds for StatefulSets
72
+
### minReadySeconds for StatefulSets {#learn-more-statefulset-minreadyseconds}
- API Changes: https://github.com/kubernetes/kubernetes/pull/96375
81
83
82
84
## How do I get involved?
83
85
84
-
Please reach out to us on [#sig-apps](https://kubernetes.slack.com/archives/C18NZM5K9) channel on slack, sig-apps mailing list-[email protected]
86
+
Please reach out to us on [#sig-apps](https://kubernetes.slack.com/archives/C18NZM5K9) channel on Slack, or through the SIG Apps mailing list[[email protected]](https://groups.google.com/g/kubernetes-sig-apps).
0 commit comments