You can remove a cluster that you deployed to Amazon Web Services (AWS).

Removing a cluster from AWS

You can remove a cluster that you installed on Amazon Web Services (AWS).

Prerequisites
  • Have a copy of the installation program that you used to deploy the cluster.

Procedure
  1. Optional: From the computer that you used to install the cluster, run the following command and record the UUID that it outputs:

    $ oc get clusterversion -o jsonpath='{.spec.clusterID}{"\n"}' version

    If not all of the cluster resources are removed from AWS, you can use this UUID to locate them and remove them.

  2. From the computer that you used to install the cluster, run the following command:

    $ ./openshift-install destroy cluster \
    --dir=<installation_directory> --log-level=debug (1)
    1 For <installation_directory>, specify the path to the directory that you stored the installation files in.

    You must specify the directory that contains the cluster definition files for your cluster. The installation program requires the metadata.json file in this directory to delete the cluster.

  3. Optional: Delete the <installation_directory> directory and the OpenShift Container Platform installation program.