I want to delete my HDInsight cluster

Isaac McSey 0 Reputation points
2025-03-25T21:29:32.3133333+00:00

I cannot ssh into the HD cluster, and Ambari UI is not loading either. The cluster has the status deallocated. I want to delete the cluster and create a new one

Azure HDInsight
Azure HDInsight
An Azure managed cluster service for open-source analytics.
224 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chandra Boorla 11,750 Reputation points Microsoft External Staff
    2025-03-25T22:13:51.58+00:00

    @Isaac McSey

    It seems like you are facing issues with your HDInsight cluster, where SSH access and the Ambari UI are not working, and the cluster is in a "deallocated" state. If you want to delete the cluster and create a new one, here’s how you can proceed:

    Check the Cluster Status - Go to the Azure Portal, navigate to HDInsight, and find your cluster. If it’s stuck in the "deallocated" state, you can move forward with the deletion process.

    Delete Dependencies Manually - Sometimes, resources like the Storage Account, Virtual Network, or Public IP can prevent deletion. Go to the Resource Group where the cluster is deployed, and manually delete these associated resources. Once these dependencies are removed, you can try deleting the cluster again.

    Use Azure CLI for Force Deletion - If manual deletion doesn’t work, you can use Azure CLI to force the deletion of the cluster. Here’s the command to run in Azure Cloud Shell or your local terminal with Azure CLI installed:

    az hdinsight delete --name <cluster-name> --resource-group <resource-group-name> --yes
    

    Replace <cluster-name> and <resource-group-name> with the actual names of your cluster and resource group.

    Use PowerShell to Stop and Delete the Cluster - If the cluster is still not deleting, you can stop it before deletion using the following PowerShell commands:

    Stop-AzHDInsightCluster -ResourceGroupName "<resource-group-name>" -ClusterName "<cluster-name>"
    Remove-AzHDInsightCluster -ResourceGroupName "<resource-group-name>" -ClusterName "<cluster-name>" -Force
    

    Make sure to replace the placeholders with your actual cluster and resource group names.

    Once the cluster is deleted, you can create a new one based on your requirements.

    For more details, please refer the following Microsoft documentations:

    I hope this information helps. Please do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.