|
| 1 | +--- |
| 2 | +title: Quickstart - Create HDInsight on AKS cluster with Azure CLI |
| 3 | +description: Learn how to use Azure CLI to create a HDInsight on AKS cluster pool. |
| 4 | +ms.service: hdinsight-aks |
| 5 | +ms.topic: quickstart |
| 6 | +ms.date: 06/04/2024 |
| 7 | +--- |
| 8 | + |
| 9 | +# Quickstart: Create a HDInsight on AKS Cluster Pool with the Azure CLI on Azure |
| 10 | + |
| 11 | +This quickstart shows you how to use the PowerShell to deploy a HDInsight on AKS Cluster Pool in Azure. |
| 12 | + |
| 13 | +## Prerequisites |
| 14 | +Ensure that you completed the [subscription prerequisites](./quickstart-prerequisites-subscription.md) and [resource prerequisites](./quickstart-prerequisites-resources.md) before creating a cluster pool. |
| 15 | + |
| 16 | +The command New-AzHdInsightOnAksClusterPool is part of Azure PowerShell module "Az.HdInsightOnAks" and it isn't installed. Run **"Install-Module Az.HdInsightOnAks"** to install it. |
| 17 | + |
| 18 | +## Launch Azure Cloud Shell |
| 19 | + |
| 20 | +The Azure Cloud Shell is a free interactive shell that you can use to run the steps in this article. It has common Azure tools preinstalled and configured to use with your account. |
| 21 | + |
| 22 | +To open the Cloud Shell, just select **Try it** from the upper right corner of a code block. Select **Copy** to copy the blocks of code, paste it into the Cloud Shell, and press enter to run it. |
| 23 | + |
| 24 | +## Create a resource group |
| 25 | + |
| 26 | +Create an Azure resource group with [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup). A resource group is a logical container into which Azure resources are deployed and managed: |
| 27 | + |
| 28 | +```Azure PowerShell |
| 29 | +New-AzResourceGroup -Name 'HDIonAKSPowershell' -Location 'West US 3' |
| 30 | +``` |
| 31 | + |
| 32 | +## Create the HDInsight on AKS Cluster Pool |
| 33 | + |
| 34 | +To create a HDInsight on AKS Cluster Pool in this resource group, use the `New-AzHdInsightOnAksClusterPool` command: |
| 35 | +```PowerShell |
| 36 | +New-AzHdInsightOnAksClusterPool |
| 37 | + -Name <String> |
| 38 | + -ResourceGroupName <String> |
| 39 | + [-SubscriptionId <String>] |
| 40 | + -Location <String> |
| 41 | + [-ClusterPoolVersion <String>] |
| 42 | + [-EnableLogAnalytics] |
| 43 | + [-LogAnalyticWorkspaceResourceId <String>] |
| 44 | + [-ManagedResourceGroupName <String>] |
| 45 | + [-NetworkProfileApiServerAuthorizedIPRange <String[]>] |
| 46 | + [-NetworkProfileEnablePrivateApiServer] |
| 47 | + [-NetworkProfileOutboundType <String>] |
| 48 | + [-SubnetId <String>] |
| 49 | + [-Tag <Hashtable>] |
| 50 | + [-VmSize <String>] |
| 51 | + [-DefaultProfile <PSObject>] |
| 52 | + [-AsJob] |
| 53 | + [-NoWait] |
| 54 | + [-WhatIf] |
| 55 | + [-Confirm] |
| 56 | + [<CommonParameters>] |
| 57 | +``` |
| 58 | +Here's an example: |
| 59 | +```PowerShell |
| 60 | +$location = "West US 3" |
| 61 | +$clusterResourceGroupName = "HDIonAKSPowershell" |
| 62 | +$clusterpoolName = "HDIClusterPoolSample" |
| 63 | +$vmSize = "Standard_E4s_v3" |
| 64 | +$clusterpoolversion="1.1" |
| 65 | +
|
| 66 | +# Create the cluster pool |
| 67 | +New-AzHdInsightOnAksClusterPool ` |
| 68 | + -Name $clusterpoolName ` |
| 69 | + -ResourceGroupName $clusterResourceGroupName ` |
| 70 | + -Location $location ` |
| 71 | + -VmSize $vmSize ` |
| 72 | + -ClusterPoolVersion $clusterpoolversion |
| 73 | +``` |
| 74 | + |
| 75 | +It takes a few minutes to create the HDInsight on AKS Cluster Pool. The following example output shows the created operation was successful. |
| 76 | + |
| 77 | +Results: |
| 78 | +<!-- expected_similarity=0.3 --> |
| 79 | +``` |
| 80 | +AkClusterProfileAkClusterAgentPoolIdentityProfileMsiClientId : a75ec1ff-3f7f-4f44-820c-6eaa5c8191af |
| 81 | +AkClusterProfileAkClusterAgentPoolIdentityProfileMsiObjectId : 13990b78-4140-4d10-b333-69bb78524375 |
| 82 | +AkClusterProfileAkClusterAgentPoolIdentityProfileMsiResourceId : /subscriptions/0b130652-e15b-417e-885a-050c9a3024a2/resourcegroups/MC_hdi-44640a235566423490b9fb694d6c05a3_HDIClusterP |
| 83 | + oolSample_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/HDIClusterPoolSample-agentpool |
| 84 | +AkClusterProfileAksClusterResourceId : /subscriptions/0b130652-e15b-417e-885a-050c9a3024a2/resourceGroups/hdi-44640a235566423490b9fb694d6c05a3/providers/Micr |
| 85 | + osoft.ContainerService/managedClusters/HDIClusterPoolSample |
| 86 | +AkClusterProfileAksVersion : 1.27.9 |
| 87 | +AksManagedResourceGroupName : MC_hdi-44640a235566423490b9fb694d6c05a3_HDIClusterPoolSample_westus3 |
| 88 | +ComputeProfileCount : 3 |
| 89 | +ComputeProfileVMSize : Standard_E4s_v3 |
| 90 | +DeploymentId : 44640a235566423490b9fb694d6c05a3 |
| 91 | +Id : /subscriptions/0b130652-e15b-417e-885a-050c9a3024a2/resourceGroups/HDIonAKSPowershell/providers/Microsoft.HDInsight/cl |
| 92 | + usterpools/HDIClusterPoolSample |
| 93 | +Location : West US 3 |
| 94 | +LogAnalyticProfileEnabled : False |
| 95 | +LogAnalyticProfileWorkspaceId : |
| 96 | +ManagedResourceGroupName : hdi-44640a235566423490b9fb694d6c05a3 |
| 97 | +Name : HDIClusterPoolSample |
| 98 | +NetworkProfileApiServerAuthorizedIPRange : |
| 99 | +NetworkProfileEnablePrivateApiServer : |
| 100 | +NetworkProfileOutboundType : |
| 101 | +NetworkProfileSubnetId : |
| 102 | +ProfileClusterPoolVersion : 1.1 |
| 103 | +ProvisioningState : Succeeded |
| 104 | +ResourceGroupName : HDIonAKSPowershell |
| 105 | +Status : Running |
| 106 | +SystemDataCreatedAt : 6/2/2024 11:53:01 AM |
| 107 | +SystemDataCreatedBy : [email protected] |
| 108 | +SystemDataCreatedByType : User |
| 109 | +SystemDataLastModifiedAt : 6/2/2024 11:53:01 AM |
| 110 | +SystemDataLastModifiedBy : [email protected] |
| 111 | +SystemDataLastModifiedByType : User |
| 112 | +Tag : { |
| 113 | + } |
| 114 | +Type : microsoft.hdinsight/clusterpools |
| 115 | +``` |
| 116 | + |
| 117 | +## Next Steps |
| 118 | + |
| 119 | +* [New-AzHdInsightOnAksClusterPool](/powershell/module/az.hdinsightonaks/new-azhdinsightonaksclusterpool) |
| 120 | +* [Create cluster pool and cluster](./quickstart-create-cluster.md) |
0 commit comments