I’m trying to create an Azure Kubernetes Service (AKS) Automatic cluster with my own custom node pool configuration, such as specifying:
VM size (Standard_D8s_v3)
Node count or autoscaler range
I followed the official documentation and sample scripts like this:
az aks create \
--resource-group $RESOURCE_GROUP_AKSAUTO \
--name $CLUSTER_NAME \
--location $LOCATION \
--apiserver-subnet-id "/subscriptions/${AZ_SUBSCRIPTION_ID}/resourceGroups/$RESOURCE_GROUP_AKSAUTO/providers/Microsoft.Network/virtualNetworks/${VNET_NAME}/subnets/apiServerSubnet" \
--vnet-subnet-id "/subscriptions/${AZ_SUBSCRIPTION_ID}/resourceGroups/$RESOURCE_GROUP_AKSAUTO/providers/Microsoft.Network/virtualNetworks/${VNET_NAME}/subnets/clusterSubnet" \
--assign-identity "/subscriptions/${AZ_SUBSCRIPTION_ID}/resourceGroups/$RESOURCE_GROUP_AKSAUTO/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${IDENTITY_NAME}" \
--sku automatic \
--node-count 2 \
--node-vm-size Standard_D8s_v3 \
--enable-cluster-autoscaler --min-count 1 --max-count 5 \
--no-ssh-key
But running this I get this error:
ERROR: (OperationNotAllowed) .properties.nodeProvisioningProfile.mode cannot be Auto unless all AgentPools have property .properties.enableAutoScaling set to one of [false]. Code: OperationNotAllowed
Even if I remove autoscaler flags, the cluster still doesn’t seem to allow customizing the node pool or VM size.
Is it currently possible to create an AKS Automatic cluster with custom node pool size or VM type, using either Azure CLI or Bicep? If not, is there any workaround or roadmap for supporting this feature?