1.9. 在 GCP 上卸载集群

您可以删除部署到 Google Cloud Platform (GCP) 的集群。

1.9.1. 删除使用安装程序置备的基础架构的集群

您可以从云中删除使用安装程序置备的基础架构的集群。

先决条件

  • 有部署集群时所用的安装程序副本。
  • 有创建集群时安装程序所生成的文件。

流程

  1. 在用来安装集群的计算机中运行以下命令:

    $ ./openshift-install destroy cluster \
    --dir=<installation_directory> --log-level=info 1 2
    1
    对于 <installation_directory>,请指定安装文件保存到的目录的路径。
    2
    要查看不同的详情,请指定 warndebugerror,而不要指定 info
    注意

    您必须为集群指定包含集群定义文件的目录。安装程序需要此目录中的 metadata.json 文件来删除集群。

  2. 可选:删除 <installation_directory> 目录和 OpenShift Container Platform 安装程序。