Modifier

Partager via


Delete an Azure Red Hat OpenShift 4 cluster

This article shows you how to delete an Azure Red Hat OpenShift cluster.

Before you begin

This article requires Azure CLI version 2.6.0 or later. Run az --version to find the version. If you need to install or upgrade, see Install Azure CLI.

Sign in to Azure

If you're running the Azure CLI locally, run az login to sign in to Azure.

az login

If you have access to multiple subscriptions, run az account set -s {subscription ID} replacing {subscription ID} with the subscription you want to use.

Delete the cluster

In previous articles for creating and connecting a cluster, the following variable was set:

RESOURCEGROUP=yourresourcegroup

Using this value, delete your cluster:

az group delete --name $RESOURCEGROUP

You'll then be prompted to confirm if you are sure you want to perform this operation. After you confirm with y, it will take several minutes to delete the cluster. When the command finishes, the entire resource group and all resources inside it, including the cluster and the virtual network, will be deleted.

Next steps

Learn more about using OpenShift with the official Red Hat OpenShift documentation.