Quickstart: Deploy an AKS cluster using Azure CLI (preview)

Applies to: AKS enabled by Azure Arc on VMware (preview)

This quickstart shows you how to deploy an AKS cluster in AKS enabled by Azure Arc on VMware using the Azure CLI.

Prerequisites

To complete this quickstart, you need to do these things:

Azure parameters

Parameter Parameter details
$aad_Group_Id The ID of a group whose members manage the target cluster. This group should also have owner permissions on the resource group containing the custom location and target cluster.
$appliance_Name Name of the Arc Resource Bridge created to connect vCenter with Azure.
$custom_Location Custom location name or ID. If you choose to Enable Kubernetes Service on VMware [preview] when you Connect vCenter to Azure from the Azure portal, a custom location with the prefix AKS-, and a default namespace, are created for you to deploy AKS on VMware. If you Enable Kubernetes Service on VMware [preview] using the Azure CLI process, you can specify the name of the custom location of your choice with the default namespace. You must use the default namespace.
$resource_Group Resource Group name or ID for deploying the Arc Resource Bridge.

vCenter server information

Parameter Parameter details
$network_name Name of the VMware network resource enabled in Azure.
$control_plane_ip The control plane IP for your target cluster. This control plane IP must be reserved/excluded in DHCP and different from the Arc Resource Bridge IP address

Step 1: Sign in to Azure

  1. Sign in to Azure using the following command:

    az login --use-device-code
    
  2. Set the Azure subscription ID to the subscription you used to deploy the Arc Resource Bridge and custom location:

    az account set -s $subscriptionID
    

Step 2: Create vNet for your AKS cluster using VMware network segment

  1. Define the network name as the name of the VMware network segment:

    $network_name = '<Name of the VMware Network segment>'
    
  2. Create a vNet with the same $resource_group you used to deploy your Arc Resource Bridge and $custom_location with the default namespace.

    az aksarc vnet create -n '<name of the vNet>' -g $resource_group --custom-location $custom_location --vsphere-segment-name $network_name
    
  3. Get the vNet ID:

    $vnet_id = az aksarc vnet show -n '<name of the vNET>'  -g $resource_group --query id -o tsv
    
  4. Pass the Control Plane IP endpoint for your target cluster:

    $control_plane_ip = '<Control Plane IP endpoint for your target cluster>'
    

    Note

    If the creation of the vNet times out, try running the commands again to recreate the vNet.

    Note

    The control plane IP must be reserved/excluded in DHCP and different from the Arc Resource Bridge IP address.

Step 3: Create the AKS cluster

Run the following command to create the cluster.

az aksarc create -n '<name of your cluster>' -g $resource_group --kubernetes-version '<Kubernetes version from the Arc Resource Bridge>' --custom-location $custom_location --aad-admin-group-object-ids $aad_group_id --vnet-ids $vnet_id --control-plane-ip $control_plane_ip --generate-ssh-keys --debug

Note

In this preview release, you can only deploy the same Kubernetes version that the Arc Resource Bridge supports. The Kubernetes version you provide in the command must align with the Arc Resource Bridge version. You can find the Arc Resource Bridge version in the Azure portal under Azure Arc > Management > Resource Bridge. To determine the corresponding Kubernetes version, see What's new with Azure Arc resource bridge.

Next steps