Skip to content

Commit 794299f

Browse files
Sig-apps 1.25 GA features
1 parent 487e932 commit 794299f

File tree

1 file changed

+66
-0
lines changed
  • content/en/blog/_posts/2022-07-27-sig-apps-GA-1.25

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
layout: blog
3+
title: "sig-apps features graduating to stable in 1.25"
4+
date: 2022-07-27
5+
slug: "sig-apps features graduating to stable in 1.25"
6+
---
7+
8+
**Authors:** Ravi Gudimetla (Apple), Filip Krepensky (Red Hat), Maciej Szulik (Red Hat)
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
11+
12+
## What problems does these features solve?
13+
14+
### MinReadySeconds for StatefulSets
15+
`minReadySeconds` ensures that the statefulset workload is `Ready` for the given number of seconds before calling the
16+
pod `Available`. The notion of being `Ready` and `Available` is quiet 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.
17+
18+
19+
### MaxSurge for DaemonSets
20+
`MaxSurge` allows a daemonset workload to run multiple instances of the same pod on a node during rollout to minimize the downtime of the daemonset to other consumers. Kubernetes system-level components like CNI, CSI are typically run as daemonsets. These components can have impact on the availablity of the workloads if those daemonsets go down momentarily during the upgrades. The feature allows daemonset pods to surge, there by ensuring zero-downtime for the daemonsets.
21+
22+
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.
23+
24+
25+
## How does it work?
26+
27+
### MinReadySeconds for StatefulSets
28+
29+
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.
30+
31+
32+
### MaxSurge for DaemonSets
33+
34+
The `DaemonSet` controller creates the additional pods 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. This value cannot be `0` when `MaxUnavailable` is 0. The default value is 0.
35+
36+
## How do I use it?
37+
38+
### MinReadySeconds for StatefulSets
39+
40+
You are required to download and install a kubectl greater than v1.22.0 version
41+
42+
Specify a value for `minReadySeconds` for any StatefulSet and you check if pods are available or not by checking
43+
`AvailableReplicas` field using:
44+
45+
`kubectl get statefulset/<name_of_the_statefulset> -o yaml
46+
47+
Please note that the default value of `minReadySeconds` is 0
48+
49+
### MaxSurge for DaemonSets
50+
51+
Specify the update strategy to `RollingUpdate` and set `.spec.updateStrategy.rollingUpdate.maxSurge`
52+
53+
54+
## How can I learn more?
55+
56+
### MinReadySeconds for StatefulSets
57+
KEP: https://github.com/kubernetes/enhancements/issues/2599
58+
API Changes: https://github.com/kubernetes/kubernetes/pull/100842
59+
60+
### MaxSurge for DaemonSets
61+
KEP: https://github.com/kubernetes/enhancements/issues/1591
62+
API Changes: https://github.com/kubernetes/kubernetes/pull/96375
63+
64+
## How do I get involved?
65+
66+
Please reach out to us on [#sig-apps](https://kubernetes.slack.com/archives/C18NZM5K9) channel on slack, sig-apps mailing [email protected]

0 commit comments

Comments
 (0)