Skip to content

Commit 2dc571d

Browse files
committed
docs(kubeadm-upgrade): add consideration on etcd upgrade impact
relates to kubernetes/kubeadm#2991 (comment) Co-authored-by: Lubomir I. Ivanov <[email protected]> Signed-off-by: Clément Nussbaumer <[email protected]>
1 parent fdc49a6 commit 2dc571d

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,28 @@ The upgrade workflow at high level is the following:
5454
with the purpose of reconfiguring the cluster is not recommended and can have unexpected results. Follow the steps in
5555
[Reconfiguring a kubeadm cluster](/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure) instead.
5656

57+
### Considerations when upgrading etcd
58+
59+
Because the `kube-apiserver` static pod is running at all times (even if you
60+
have drained the node), when you perform a kubeadm upgrade which includes an
61+
etcd upgrade, in-flight requests to the server will stall while the new etcd
62+
static pod is restarting. As a workaround, it is possible to actively stop the
63+
`kube-apiserver` process a few seconds before starting the `kubeadm upgrade
64+
apply` command. This permits to complete in-flight requests and close existing
65+
connections, and minimizes the consequence of the etcd downtime. This can be
66+
done as follows on control plane nodes:
67+
68+
```shell
69+
killall -s SIGTERM kube-apiserver # trigger a graceful kube-apiserver shutdown
70+
sleep 20 # wait a little bit to permit completing in-flight requests
71+
kubeadm upgrade ... # execute a kubeadm upgrade command
72+
```
73+
5774
<!-- steps -->
5875

5976
## Changing the package repository
6077

61-
If you're using the community-owned package repositories (`pkgs.k8s.io`), you need to
78+
If you're using the community-owned package repositories (`pkgs.k8s.io`), you need to
6279
enable the package repository for the desired Kubernetes minor release. This is explained in
6380
[Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
6481
document.
@@ -320,4 +337,4 @@ and post-upgrade manifest file for a certain component, a backup file for it wil
320337
`kubeadm upgrade node` does the following on worker nodes:
321338

322339
- Fetches the kubeadm `ClusterConfiguration` from the cluster.
323-
- Upgrades the kubelet configuration for this node.
340+
- Upgrades the kubelet configuration for this node.

0 commit comments

Comments
 (0)