云容器引擎 CCE-Helm v2 Release转换成Helm v3 Release:转换流程(不使用Helm v3客户端)

时间:2023-11-01 16:25:54

转换流程(不使用Helm v3客户端)

  1. 在CCE节点上下载helm 2to3 转换插件。

    wget https://github.com/helm/helm-2to3/releases/download/v0.10.2/helm-2to3_0.10.2_linux_amd64.tar.gz

  1. 解压插件包。

    tar -xzvf helm-2to3_0.10.2_linux_amd64.tar.gz

  1. 模拟转换。

    以test-convert实例为例,执行以下命令进行转换的模拟。若出现以下提示,说明模拟转换成功。

    # ./2to3 convert --dry-run --tiller-out-cluster -s configmaps test-convertNOTE: This is in dry-run mode, the following actions will not be executed.Run without --dry-run to take the actions described below:Release "test-convert" will be converted from Helm v2 to Helm v3.[Helm 3] Release "test-convert" will be created.[Helm 3] ReleaseVersion "test-convert.v1" will be created.

  2. 执行正式转换。若出现以下提示,说明转换成功。

    # ./2to3 convert --tiller-out-cluster -s configmaps test-convertRelease "test-convert" will be converted from Helm v2 to Helm v3.[Helm 3] Release "test-convert" will be created.[Helm 3] ReleaseVersion "test-convert.v1" will be created.[Helm 3] ReleaseVersion "test-convert.v1" created.[Helm 3] Release "test-convert" created.Release "test-convert" was converted successfully from Helm v2 to Helm v3.Note: The v2 release information still remains and should be removed to avoid conflicts with the migrated v3 release.v2 release information should only be removed using `helm 2to3` cleanup and when all releases have been migrated over.

  3. 转换完成后进行v2 release资源的清理,同样先进行模拟清理,成功后正式清理v2 release资源。

    模拟清理:

    # ./2to3 cleanup --dry-run --tiller-out-cluster -s configmaps --name test-convertNOTE: This is in dry-run mode, the following actions will not be executed.Run without --dry-run to take the actions described below:WARNING: "Release 'test-convert' Data" will be removed.  [Cleanup/confirm] Are you sure you want to cleanup Helm v2 data? [y/N]: yHelm v2 data will be cleaned up.[Helm 2] Release 'test-convert' will be deleted.[Helm 2] ReleaseVersion "test-convert.v1" will be deleted.

    正式清理:

    # ./2to3 cleanup --tiller-out-cluster -s configmaps --name test-convertWARNING: "Release 'test-convert' Data" will be removed.  [Cleanup/confirm] Are you sure you want to cleanup Helm v2 data? [y/N]: yHelm v2 data will be cleaned up.[Helm 2] Release 'test-convert' will be deleted.[Helm 2] ReleaseVersion "test-convert.v1" will be deleted.[Helm 2] ReleaseVersion "test-convert.v1" d

support.huaweicloud.com/usermanual-cce/cce_10_0422.html