Environment  环境
  • Rancher v2.6 - v2.12  牧场主 v2.6 - v2.12
  • A Rancher-provisioned RKE2 or K3s cluster with customizations to add-on configurations
    一个由 Rancher 配置的 RKE2 或 K3s 集群,并可自定义附加配置
Procedure  程序

In Rancher-provisioned RKE2 and K3s clusters the cluster components, such as the CNI or Cloud Provider, are managed via add-ons. The version of an add-on, and the available configuration, in addition to as default values, are tied to the particular RKE2 or K3s Kubernetes version.
在 Rancher 配置的 RKE2 和 K3s 集群中,集群组件,如 CNI 或云提供商,通过插件管理。插件的版本及其可用配置,除了默认值外,都绑定于特定的 RKE2 或 K3s Kubernetes 版本。

In the UI form for add-on configuration (e.g. Cluster Management -> Edit Config -> Add-on: Calico) a warning is displayed: "Add-On Configuration can vary between Kubernetes versions. Changing the Kubernetes version may reset the values below." Upgrading the Kubernetes version (Cluster Management -> Edit Config -> Basics -> Kubernetes Version) and clicking 'Save' will display a warning: "Changing the Kubernetes Version can reset Add-On values. You should check that the values are as expected before continuing." If a user clicks 'Continue' and the upgrade is performed, without first re-applying any add-on configuration customizations, add-on configuration may revert to the default values, resulting in unexpected behaviour or cluster errors.
在插件配置的界面表单中(例如:集群管理 -> 编辑配置 -> 插件:Calico)显示警告:“插件配置在不同 Kubernetes 版本之间可能有所不同。更改 Kubernetes 版本可能会重置以下数值。”升级 Kubernetes 版本(Cluster Management -> 编辑配置 -> 基础 -> Kubernetes 版本)并点击“保存”会显示警告:“更改 Kubernetes 版本可以重置插件值。继续之前,你应该检查数值是否符合预期。”如果用户点击“继续”并完成升级,且未先重新应用任何附加配置自定义,附加配置可能会恢复为默认值,导致意外行为或集群错误。

In order to mitigate this and ensure that any custom add-on configuration is persisted across the upgrade, the following procedure should be used:
为了缓解这一问题并确保任何自定义附加配置在升级过程中得以保留,应采用以下步骤:

  • Take a copy of the add-on custom configurations
    获取附加自定义配置的副本
  • Change the Kubernetes Version
    更改 Kubernetes 版本
  • Navigate back to the add-on configurations and re-apply any custom values that have been erased as a result of the change in Kubernetes Version
    返回插件配置,重新应用因 Kubernetes 版本变更而被删除的自定义值
  • Click on Save to apply the changes, and click Continue when the Add-On Reset warning is displayed
    点击保存以应用更改,当显示“插件重置”警告时点击继续

In Rancher v2.13 improvements have been made to the UI handling of custom add-on configuration values, as detailed in https://github.com/rancher/dashboard/issues/5837
在 Rancher v2.13 中,用户界面处理自定义附加配置值有所改进,详见 https://github.com/rancher/dashboard/issues/5837

访问Rancher-K8S解决方案博主,企业合作伙伴 :
https://blog.csdn.net/lidw2009

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐