Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
hi cargobuddy, thx for sharing urs issue here at Q&A portal,
check whether the AKS cluster is using Node Auto-Provisioning/Auto mode. If yes, don’t enable the classic autoscaler on existing node pools. Pick one model NAP/Karpenter-style provisioning, or classic node pool autoscaler. Mixing both is what’s causing the OperationNotAllowed error, this error doesn’t look like a VMSS problem directly. It looks like ur AKS cluster has Node Auto-Provisioning / Auto mode enabled, and that conflicts with enabling the classic cluster autoscaler on existing agent pools.
Microsoft describes Node Auto-Provisioning as a newer AKS feature that automatically provisions and manages nodes based on pending pod needs, using Karpenter under the hood. That’s different from the classic AKS cluster autoscaler, which scales existing node pools. The key part of the error is this
nodeProvisioningProfile.mode cannot be Auto unless all AgentPools have enableAutoScaling set to false
AKS is saying, “u can’t use this Auto node provisioning mode while any normal node pool autoscaler is enabled.” Yeah, very Azure-ish wording technically correct, emotionally hostile.
I’d verify the cluster-level node provisioning mode
az aks show \
--resource-group <rg> \
--name <cluster-name> \
--query "nodeProvisioningProfile"
check the node pools
az aks nodepool list \
--resource-group <rg> \
--cluster-name <cluster-name> \
--query "[].{name:name, enableAutoScaling:enableAutoScaling, count:count, min:minCount, max:maxCount, mode:mode}"
If nodeProvisioningProfile.mode is Auto, then the fix is not to enable autoscaler on the existing VMSS node pools. U either keep Node Auto-Provisioning and leave enableAutoScaling false on all agent pools, or u disable Node Auto-Provisioning and then use the classic cluster autoscaler on the node pools.
One more thing this command doesn’t really make sense for autoscaling
--min-count 2 --max-count 2
That means the autoscaler has nowhere to scale. Min and max are both 2, so it’s basically manual scaling wearing a fake mustache. Use something like --min-count 2 --max-count 5 if u actually want scaling.
https://learn.microsoft.com/en-us/azure/aks/cluster-autoscaler
rgds,
Alex
&
If my answer was helpful pls mark it and additional thx if u follow me at Q&A portal