完成 Knative serving 升级

如需完成集群的升级和到 Knative serving 舰队组件的迁移,您必须从集群中移除所有过时和未使用的资源。

准备工作

概览

在此步骤中,迁移脚本用于执行以下操作:

  • 通过 appdevexperience-operator operator 对 Knative serving 资源实施完全控制。
  • 删除捆绑的 Istio 和 Knative serving GKE 插件。
  • 删除所有帮助程序 configmap。

然后,您可以重新启用“缩减至零”功能。

完成 Knative serving 升级

如需完成 Knative serving 升级并完成迁移过程,请执行以下操作:

  1. 运行以下命令以启动迁移脚本:

    ./migration-addon.sh --command finalize
    
  2. 在终端中,迁移脚本会提示您确认继续进行。输入 y 以完成此过程。

    此最后步骤过程中的提示类似于以下内容:

    In the process of cleaning up, the script performs the following:
    1. enforcing Knative serving operator fully controls Knative serving resources.<br>
    2. deleting Istio slim installed by Knative serving GKE add-on<br>
    3. deleting helper configmaps
    Continue? [Y/n] y<br>
    
    1. enforcing Knative serving operator fully controls Knative serving resources.
    cloudrun.operator.run.cloud.google.com/cloud-run patched
    
    Waiting for Knative serving serving to be ready...
    Knative serving serving is ready.
    
    2. Deleting Istio slim resources
    
    3. Deleting helper configmaps
    
    Cleanup is done. The upgrade to new Knative serving completes! <br>
    
  3. 运行以下命令启用“缩减至零”:

    kubectl patch cm config-autoscaler -n knative-serving -p '{"data":{"enable-scale-to-zero": "true"}}'