@@ -98,16 +98,18 @@ The upgrade workflow at high level is the following:
98
98
<!--
99
99
- To verify that the kubelet service has successfully restarted after the kubelet has been upgraded,
100
100
you can execute `systemctl status kubelet` or view the service logs with `journalctl -xeu kubelet`.
101
- - Usage of the `--config` flag of `kubeadm upgrade` with
102
- [kubeadm configuration API types](/docs/reference/config-api/kubeadm-config.v1beta3)
103
- with the purpose of reconfiguring the cluster is not recommended and can have unexpected results. Follow the steps in
101
+ - `kubeadm upgrade` supports `--config` with a
102
+ [`UpgradeConfiguration` API type](/docs/reference/config-api/kubeadm-config.v1beta4) which can
103
+ be used to configure the upgrade process.
104
+ - `kubeadm upgrade` does not support reconfiguration of an existing cluster. Follow the steps in
104
105
[Reconfiguring a kubeadm cluster](/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure) instead.
105
106
-->
106
107
- 要验证 kubelet 服务在升级后是否成功重启,可以执行 ` systemctl status kubelet `
107
108
或 ` journalctl -xeu kubelet ` 查看服务日志。
108
- - 不建议使用 ` kubeadm upgrade ` 的 ` --config ` 参数和
109
- [ kubeadm 配置 API 类型] ( /zh-cn/docs/reference/config-api/kubeadm-config.v1beta3 ) 来重新配置集群,
110
- 这样会产生意想不到的结果。
109
+ - ` kubeadm upgrade ` 支持 ` --config ` 和
110
+ [ ` UpgradeConfiguration ` API 类型] ( /zh-cn/docs/reference/config-api/kubeadm-config.v1beta4 )
111
+ 可用于配置升级过程。
112
+ - ` kubeadm upgrade ` 不支持重新配置现有集群。
111
113
请按照[ 重新配置 kubeadm 集群] ( /zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-reconfigure ) 中的步骤来进行。
112
114
113
115
<!--
@@ -306,17 +308,6 @@ Pick a control plane node that you wish to upgrade first. It must have the `/etc
306
308
更多的信息,可参阅[ 证书管理指南] ( /zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs ) 。
307
309
{{</ note >}}
308
310
309
- {{< note >}}
310
- <!--
311
- If `kubeadm upgrade plan` shows any component configs that require manual upgrade, users must provide
312
- a config file with replacement configs to `kubeadm upgrade apply` via the `--config` command line flag.
313
- Failing to do so will cause `kubeadm upgrade apply` to exit with an error and not perform an upgrade.
314
- -->
315
- 如果 ` kubeadm upgrade plan ` 给出任何需要手动升级的组件配置,
316
- 用户必须通过 ` --config ` 命令行标志向 ` kubeadm upgrade apply ` 命令提供替代的配置文件。
317
- 如果不这样做,` kubeadm upgrade apply ` 会出错并退出,不再执行升级操作。
318
- {{</ note >}}
319
-
320
311
<!--
321
312
1. Choose a version to upgrade to, and run the appropriate command. For example:
322
313
-->
@@ -353,23 +344,14 @@ Pick a control plane node that you wish to upgrade first. It must have the `/etc
353
344
the control plane instances have been upgraded before starting to upgrade the addons. You must perform control plane
354
345
instances upgrade sequentially or at least ensure that the last control plane instance upgrade is not started until all
355
346
the other control plane instances have been upgraded completely, and the addons upgrade will be performed after the last
356
- control plane instance is upgraded. If you want to keep the old upgrade behavior, please enable the `UpgradeAddonsBeforeControlPlane`
357
- feature gate by `kubeadm upgrade apply --feature-gates=UpgradeAddonsBeforeControlPlane=true`. The Kubernetes project does
358
- not in general recommend enabling this feature gate, you should instead change your upgrade process or cluster addons so
359
- that you do not need to enable the legacy behavior. The `UpgradeAddonsBeforeControlPlane` feature gate will be removed in
360
- a future release.
347
+ control plane instance is upgraded.
361
348
-->
362
349
对于 v1.28 之前的版本,kubeadm 默认采用这样一种模式:在 ` kubeadm upgrade apply `
363
350
期间立即升级插件(包括 CoreDNS 和 kube-proxy),而不管是否还有其他尚未升级的控制平面实例。
364
351
这可能会导致兼容性问题。从 v1.28 开始,kubeadm 默认采用这样一种模式:
365
352
在开始升级插件之前,先检查是否已经升级所有的控制平面实例。
366
353
你必须按顺序执行控制平面实例的升级,或者至少确保在所有其他控制平面实例已完成升级之前不启动最后一个控制平面实例的升级,
367
- 并且在最后一个控制平面实例完成升级之后才执行插件的升级。如果你要保留旧的升级行为,可以通过
368
- ` kubeadm upgrade apply --feature-gates=UpgradeAddonsBeforeControlPlane=true ` 启用
369
- ` UpgradeAddonsBeforeControlPlane ` 特性门控。Kubernetes 项目通常不建议启用此特性门控,
370
- 你应该转为更改你的升级过程或集群插件,这样你就不需要启用旧的行为。
371
- ` UpgradeAddonsBeforeControlPlane ` 特性门控将在后续的版本中被移除。
372
-
354
+ 并且在最后一个控制平面实例完成升级之后才执行插件的升级。
373
355
{{</ note >}}
374
356
375
357
<!--
0 commit comments