Introduction
This article will help you learn how to delete an HDInsight Cluster on Azure. Deleting an HDInsight Cluster is very important for us, because it is a paid service that consumes money from your Azure account, from the second you started it, to the second you delete it from Azure portal, irrespective of whether you used its service or not.
Note - Visit my previous articles to know about HDInsight, Cluster, Hive, the process of creating a Cluster, running a Hive query, importing a job output into Excel from HDInsight, etc.
Now, follow the below steps.
Step 1 - Login to Azure portal in which you have created HDInsight cluster earlier.
Here, you can find the details of the money, consumed from your Azure account for the cluster which you have created, under notification pane.
Step 2 - Here, we have a Cluster named “HDCCUG”. This is the cluster that we are going to delete from the Azure portal.
You can find the status of the HDInsight Cluster which is represented as running. If you cannot find the HDInsight Cluster on your Dashboard, then you can find it using the search resource option, available at the top pane.
Here, under All Resources, you can find the HDCCUG Cluster.
Step 3 - Click on the Cluster now. This will open the Cluster options.
Step 4 - Click on “Delete” option available at the HDInsight Cluster followed by “Yes” to give confirmation to delete the cluster.
You can find that the Cluster is getting deleted now.
And now, your HDInsight Cluster has been completely deleted from the Azure portal.
You can click on the options and remove the tile if you don’t want it in the Dashboard.
Follow the below commands to delete the HDInsight Cluster from Azure portal, using PowerShell and Azure CLI.
For Azure PowerShell
Run your PowerShell and login with the Azure account of yours using the below commands and delete the Cluster.
Add-AzureAccount
Remove-AzureRmHDInsightCluster -ClusterName CLUSTERNAME
*Replace the CLUSTERNAME with your Azure HDInsight Cluster name on the previous commands.
For Azure CLI
From a prompt, use the following command,
azure hdinsight cluster delete CLUSTERNAME
*Replace the CLUSTERNAME with your Azure HDInsight Cluster name on the previous commands.