azure-cli: Create AKS cluster fails on 2.4.0
Describe the bug
AKS cluster creation failed after upgrade of az cli from 2.2.0 to 2.4.0
To Reproduce
Run AKS cluster create
az aks create --name gleb-aks-bkp-atom-hero --resource-group cluster-name --node-count 5 --generate-ssh-keys --vm-set-type VirtualMachineScaleSets --enable-addons monitoring --service-principal <service-principal> --client-secret <client-secret> --kubernetes-version 1.14.8 --node-vm-size Standard_DS3_v2
Expected behavior
Cluster gets created
Actual result
The behavior of this command has been altered by the following extension: aks-preview
The request content was invalid and could not be deserialized: 'Could not find member 'template' on object of type 'DeploymentDefinition'. Path 'template', line 1, position 12.'.
Environment summary
OS Linux Ubuntu 18.04 azure-cli 2.4.0
This command does work when az cli version is
2.2.0 *
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (10 by maintainers)
This should be fixed in the latest extension version 0.4.44.
Please report back if that fixes the issue.
I’ve got this
https://github.com/Azure/azure-cli-extensions/pull/1635
Fixed in extensions 0.4.60.
The issue below happens when using CLI 2.10.0 so make sure you’re on extension 0.4.60 or above if you plan to use latest cli and work with the monitoring addon.
@marwanad works like a charm. Thanks 😃
Using CLI 2.4.0 cannot create AKS with windows node VM. Command: az aks create --resource-group myResourceGroup1 --name testSCluster1 --node-count 1 monitoring–enable-addons --kubernetes-version 1.17.3 --gener ate-ssh-keys --windows-admin-username azureuser --vm-set-type VirtualMachineScaleSets --node-vm-size Standard_F2s_v2 --network-plugin azure Error: The request content was invalid and could not be deserialized: ‘Could not find member ‘template’ on object of type ‘DeploymentDefinition’. Path ‘template’, line 1, position 12.’.
CLI2.1.0/2.2.0 can deploy it successfully.
I’ve just tried latest on my machine with
0.4.43
and the reslut is the same@jluk
I know that aks-preview is not quite up to date 0.43, but I’ve used the latest one from