更新时间:2024-04-30 GMT+08:00
分享

原集群卸载重装方案

前提

确保准备工作已完成。

移除集群

  1. 删除网格内的网关资源。

  2. 单击企业版网格名称进入网格详情页,依次单击“网格配置 -> 基本信息 -> 移除集群” 。

  3. 选择“重启已有服务”。

(可选)升级集群版本

  1. 参考CCE集群升级指南进行集群版本升级,推荐升级到1.28版本。

创建新网格

  1. 根据如下支持列表选择创建基础网格。

    表1 网格版本支持的集群版本

    网格版本

    CCE集群版本

    1.8

    1.15-1.21

    1.13

    1.21-1.23

    1.15

    1.21-1.27

    1.18

    1.25-1.28

  2. 选择从企业版网格移除出来的集群创建基础版网格。

  3. 选择需要开始自动注入的命名空间(准备工作中记录的命名空间) -> 选择“重启已有服务”。

配置同步

  1. 将准备工作中备份的配置文件在新网格中恢复,若未配置kubectl命令,可参考CCE配置kubectl

    kubectl create -f all-svc.yaml
    
    kubectl create -f all-vs.yaml
    kubectl create -f all-dr.yaml
    kubectl create -f all-gw.yaml
    kubectl create -f all-se.yaml
    kubectl create -f all-ef.yaml
    kubectl create -f all-sidecar.yaml
    kubectl create -f all-we.yaml
    kubectl create -f all-wg.yaml
    kubectl create -f all-pa.yaml
    kubectl create -f all-ra.yaml
    kubectl create -f all-ap.yaml
    
    kubectl create -f user-all-svc.yaml
    kubectl create -f user-all-secret.yaml

    若出现“Error from server (AlreadyExists): xxxxx already exists” 已存在的报错则忽略。

  2. 删除新版本无用配置。

    • 若源版本是1.6企业版则执行如下命令:
      kubectl -nistio-system delete svc istiod-remote
      kubectl -nistio-system delete svc istiod-elb
      kubectl -nistio-system delete vs istiod
    • 若源版本是1.8企业版则执行如下命令:
      kubectl -nistio-system delete envoyfilter metadata-exchange-1.6 
      kubectl -nistio-system delete envoyfilter metadata-exchange-1.7 
      kubectl -nistio-system delete envoyfilter metadata-exchange-1.8 
      kubectl -nistio-system delete envoyfilter stats-filter-1.6
      kubectl -nistio-system delete envoyfilter stats-filter-1.7
      kubectl -nistio-system delete envoyfilter stats-filter-1.8
      kubectl -nistio-system delete envoyfilter tcp-metadata-exchange-1.6
      kubectl -nistio-system delete envoyfilter tcp-metadata-exchange-1.7
      kubectl -nistio-system delete envoyfilter tcp-metadata-exchange-1.8
      kubectl -nistio-system delete envoyfilter tcp-stats-filter-1.6
      kubectl -nistio-system delete envoyfilter tcp-stats-filter-1.7
      kubectl -nistio-system delete envoyfilter tcp-stats-filter-1.8
      kubectl -nistio-system delete svc istiod-remote
      kubectl -nistio-system delete svc istiod-elb
      kubectl -nistio-system delete vs istiod

功能验证

  1. 查看console功能是否正常,如网关路由显示 ,网关访问等。

  2. 验证业务功能是否正常。

异常回退

  1. 单击删除按钮卸载基础版网格,选择“重启已有服务”。

  2. 卸载后将集群添加回1.0企业版。

  3. 选择集群 -> 选择“扁平网格” -> 选择需要开始自动注入的命名空间(准备工作中记录的命名空间) -> 选择“重启已有服务”。

  4. 使用控制面kubectl 执行如下命令。

    kubectl create -f all-svc.yaml
    
    kubectl create -f all-vs.yaml
    kubectl create -f all-dr.yaml
    kubectl create -f all-gw.yaml
    kubectl create -f all-se.yaml
    kubectl create -f all-ef.yaml
    kubectl create -f all-sidecar.yaml
    kubectl create -f all-we.yaml
    kubectl create -f all-wg.yaml
    kubectl create -f all-pa.yaml
    kubectl create -f all-ra.yaml
    kubectl create -f all-ap.yaml

  5. 使用数据面集群kubectl执行如下命令。

    kubectl create -f user-all-svc.yaml
    kubectl create -f user-all-secret.yaml

  6. 功能验证。

    • 网关访问正常

    • 路由显示正常

分享:

    相关文档

    相关产品