@@ -110,12 +110,44 @@ The upgrade workflow at high level is the following:
110
110
这样会产生意想不到的结果。
111
111
请按照[ 重新配置 kubeadm 集群] ( /zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure ) 中的步骤来进行。
112
112
113
+ <!--
114
+ ### Considerations when upgrading etcd
115
+
116
+ Because the `kube-apiserver` static pod is running at all times (even if you
117
+ have drained the node), when you perform a kubeadm upgrade which includes an
118
+ etcd upgrade, in-flight requests to the server will stall while the new etcd
119
+ static pod is restarting. As a workaround, it is possible to actively stop the
120
+ `kube-apiserver` process a few seconds before starting the `kubeadm upgrade
121
+ apply` command. This permits to complete in-flight requests and close existing
122
+ connections, and minimizes the consequence of the etcd downtime. This can be
123
+ done as follows on control plane nodes:
124
+ -->
125
+ ### 升级 etcd 时的注意事项
126
+
127
+ 由于 ` kube-apiserver ` 静态 Pod 始终在运行(即使你已经执行了腾空节点的操作),
128
+ 因此当你执行包括 etcd 升级在内的 kubeadm 升级时,对服务器正在进行的请求将停滞,
129
+ 因为要重新启动新的 etcd 静态 Pod。作为一种解决方法,可以在运行 ` kubeadm upgrade apply `
130
+ 命令之前主动停止 ` kube-apiserver ` 进程几秒钟。这样可以允许正在进行的请求完成处理并关闭现有连接,
131
+ 并最大限度地减少 etcd 停机的后果。此操作可以在控制平面节点上按如下方式完成:
132
+
133
+ <!--
134
+ ```shell
135
+ # trigger a graceful kube-apiserver shutdown
136
+ # wait a little bit to permit completing in-flight requests
137
+ # execute a kubeadm upgrade command
138
+ -->
139
+ ``` shell
140
+ killall -s SIGTERM kube-apiserver # 触发 kube-apiserver 体面关闭
141
+ sleep 20 # 等待一下,以完成进行中的请求
142
+ kubeadm upgrade ... # 执行 kubeadm 升级命令
143
+ ```
144
+
113
145
<!-- steps -->
114
146
115
147
<!--
116
148
## Changing the package repository
117
149
118
- If you're using the community-owned package repositories (`pkgs.k8s.io`), you need to
150
+ If you're using the community-owned package repositories (`pkgs.k8s.io`), you need to
119
151
enable the package repository for the desired Kubernetes minor release. This is explained in
120
152
[Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
121
153
document.
0 commit comments