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 *
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm.
aks
@stgleb it looks like you have the aks-preview extension installed, which overrides the core build. Can you share what version of the preview extension you are on?
@jluk
I know that aks-preview is not quite up to date 0.43, but I've used the latest one from
azure-cli 2.4.0
command-modules-nspkg 2.0.3
core 2.4.0
nspkg 3.0.4
telemetry 1.0.4
Extensions:
aks-preview 0.4.43
Python location '/opt/az/bin/python3'
Extensions directory '/home/stgleb/.azure/cliextensions'
Python (Linux) 3.6.5 (default, Apr 17 2020, 09:40:29)
[GCC 7.5.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
@JunSun17 or @marwanad does this error look familiar to you?
@stgleb can you try the latest aks-preview? Maybe it is an issue for the old version?
I've just tried latest on my machine with 0.4.43
and the reslut is the same
I just tried creating with 2.4.0
CLI and no preview and haven't hit issues.
Can you try a simple az aks create
without --enable-addons monitoring
?
edit: just tested with that and I've hit no issues
@marwanad yes it works without monitoring enabled, do yoou have any ideas why? I wish to keep this addon.
@stgleb still investigating the issue, you can follow your create commands with this as a workaround in the meantime.
az aks enable-addons -a monitoring -g {resource_group} -n {cluster_name}
I've got this
az aks enable-addons -a monitoring -g gleb-aks-mangrove-fox -n gleb-aks-mangrove-fox
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.'.
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.
Thanks @marwanad for workaround but I just tried and got the same error with seperate monitoring
az aks enable-addons -a monitoring -g $resourcegroup -n $aksname
@lgmorand @marwanad +1 for the same error for separate monitrogin enabling
This should be fixed in the latest extension version 0.4.44.
az extension update --name aks-preview
Please report back if that fixes the issue.
@marwanad works like a charm. Thanks :)
Closing with a resolution of updating to preview extension 0.4.44.
Thank you @marwanad for driving this fix. If this isn't resolved for people after that resolution, comment and we can re-open.
Thanks for the feedback.
Getting same error with aks-preview extension 0.4.58 using monitoring addon. Works without aks-preview extension
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.'.
cc @marwanad
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.
Getting same error with aks-preview extension 0.4.58 using monitoring addon. Works without aks-preview extension
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.'.
cc @marwanad
Most helpful comment
This should be fixed in the latest extension version 0.4.44.
Please report back if that fixes the issue.