Export cluster ARM template - Azure CLI

Note

We will retire Azure HDInsight on AKS on January 31, 2025. Before January 31, 2025, you will need to migrate your workloads to Microsoft Fabric or an equivalent Azure product to avoid abrupt termination of your workloads. The remaining clusters on your subscription will be stopped and removed from the host.

Only basic support will be available until the retirement date.

Important

This feature is currently in preview. The Supplemental Terms of Use for Microsoft Azure Previews include more legal terms that apply to Azure features that are in beta, in preview, or otherwise not yet released into general availability. For information about this specific preview, see Azure HDInsight on AKS preview information. For questions or feature suggestions, please submit a request on AskHDInsight with the details and follow us for more updates on Azure HDInsight Community.

This article describes how to generate an ARM template using Azure CLI.

Prerequisites

  • An operational HDInsight on AKS cluster.

Steps to generate ARM template for the cluster

  1. Run the following command.

    
    az group export --resource-group "{cluster-rg}" --resource-ids "{resource_id}" --include-parameter-default-value --include-comments
    
    # cluster-rg = Resource group of your cluster
    # resource_id = Cluster resource id. You can get it from "JSON view" in the overview blade of your cluster in the Azure portal.
    

    Screenshot showing output of the command executed to get the ARM template of the HDInsight on AKS Cluster.

Now, your cluster ARM template is ready. You can update the properties of the cluster and finally deploy the ARM template to refresh the resources. Learn how to deploy an ARM template.