Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this quickstart, you delete an Azure Red Hat OpenShift with hosted control planes (HCP) cluster by using the Azure CLI. When you delete the cluster, you also delete its node pools and the managed resource group. The customer resource group, virtual network, and subnets aren't deleted automatically. You must remove these resources separately.
Prerequisites
- Azure CLI version 2.67.0 or higher.
Use
az --versionto check your installed version. To install or upgrade, see Install Azure CLI.
- The ARO HCP CLI extension is installed. If you need to install it, download the wheel file for the ARO HCP CLI extension.
Delete the cluster
Set the following environment variables. Replace the placeholder values with the names of the resource group and cluster that you want to delete.
CUSTOMER_RG_NAME="<resource-group-name>" CLUSTER_NAME="<cluster-name>"Delete the cluster. This operation is asynchronous and might take several minutes to complete.
az aro hcp cluster delete \ --name "${CLUSTER_NAME}" \ --resource-group "${CUSTOMER_RG_NAME}" \ --yesVerify that the cluster is deleted by checking its status. If the cluster is successfully deleted, this command returns a resource not found error.
az aro hcp cluster show \ --name "${CLUSTER_NAME}" \ --resource-group "${CUSTOMER_RG_NAME}" \ --query "properties.provisioningState" \ --output tsv
Clean up resources
After the cluster is deleted, delete the resource group if you no longer need it. Deleting the resource group also deletes the virtual network, subnets, and any other resources it contains.
az group delete --name ${CUSTOMER_RG_NAME}