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:
- Delete an HDInsight cluster using your browser, PowerShell, or the Azure CLI
- Remove-AzHDInsightCluster
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.