title | description | author | ms.author | ms.topic | ms.custom | ms.date | ms.lastreviewed | ms.reviewer |
---|---|---|---|---|---|---|---|---|
Quickstart - Deploy an AKS cluster using Azure CLI (preview) |
Learn how to deploy an AKS cluster in AKS on VMware. |
sethmanheim |
sethm |
quickstart |
devx-track-azurecli |
03/22/2024 |
03/22/2024 |
leslielin |
[!INCLUDE aks-applies-to-vmware]
This quickstart shows you how to deploy an AKS cluster in AKS enabled by Azure Arc on VMware using the Azure CLI.
To complete this quickstart, you need to do these things:
- Make sure you review and satisfy all the requirements in System requirements and support matrix and networking requirements.
- Make sure you deploy Arc-enabled VMware vSphere by connecting vCenter to Azure with the Kubernetes Extension for AKS Arc Operators.
- If you have an existing Arc-enabled VMware vSphere deployment, follow the process to enable Kubernetes Extension for AKS Arc Operators.
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. |
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 |
-
Sign in to Azure using the following command:
az login --use-device-code
-
Set the Azure subscription ID to the subscription you used to deploy the Arc Resource Bridge and custom location:
az account set -s $subscriptionID
-
Define the network name as the name of the VMware network segment:
$network_name = '<Name of the VMware Network segment>'
-
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
-
Get the vNet ID:
$vnet_id = az aksarc vnet show -n '<name of the vNET>' -g $resource_group --query id -o tsv
-
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.
Run the following command to create the cluster:
az aksarc create -n '<name of your cluster>' -g $resource_group --kubernetes-version 'v1.26.6' --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
- See Supported deployment scale for the different configuration options.
- Prepare an application