Destroying the Hosted Cluster

In this section we will cover how a hosted cluster can be destroyed from the Web Console and from the CLI.

Destroying the Hosted Cluster from the Web Console

  1. Access the OpenShift Console and login with the OpenShift admin credentials you got in the lab’s email.

  2. On the top bar, next to the Red Hat OpenShift logo, make sure All Clusters is selected. This will show us the MultiCloud console.

  3. Click on the cluster named hosted, that will get you to the cluster view. Click on ActionsDestroy cluster.

    Hosted Cluster Destroy Screen 1
  4. Confirm the operation and click on Destroy.

    Hosted Cluster UpgDestroyrade Screen 2
  5. It may take up to 5 minutes for the hosted cluster to be destroyed.

Destroying the Hosted Cluster from the CLI

  1. Remove the ManagedCluster resource

    oc --kubeconfig ~/hypershift-lab/mgmt-kubeconfig delete managedcluster hosted
    This command can take up to 5 minutes to complete.
    managedcluster.cluster.open-cluster-management.io "hosted" deleted
  2. Delete the HostedCluster resource

    oc --kubeconfig ~/hypershift-lab/mgmt-kubeconfig -n hosted delete hostedcluster hosted
    This command can take up to 5 minutes to complete.
    hostedcluster.hypershift.openshift.io "hosted" deleted