az aks create --enable-addons monitoring 'The request content was invalid and could not be deserialized'
CLI Version az version -o yaml azure-cli: 2.4.0 azure-cli-command-modules-nspkg: 2.0.3 azure-cli-core: 2.4.0 azure-cli-nspkg: 3.0.4 azure-cli-telemetry: 1.0.4 extensions: aks-preview: 0.4.24 azure-firewall: 0.1.3 interactive: 0.4.3
Describe the bug When using az aks create with the --enable-addons flag you get the following 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.'.
To Reproduce az group create -n TrashBugTest -l eastus az aks create -g TrashBugTest -n aksclibugtest --enable-addons monitoring
Expected behavior Cluster is created successfully
Environment summary Azure Cloud Shell azure-cli: 2.4.0 azure-cli-command-modules-nspkg: 2.0.3 azure-cli-core: 2.4.0 azure-cli-nspkg: 3.0.4 azure-cli-telemetry: 1.0.4 extensions: aks-preview: 0.4.24 azure-firewall: 0.1.3 interactive: 0.4.3
System OS: MacOS Catalina Browser: Chrome Version 81.0.4044.138 (Official Build) (64-bit)
Additional context I've tested with my local CLI install, which is as follows and do not see this issue: azure-cli: 2.3.1 azure-cli-command-modules-nspkg: 2.0.3 azure-cli-core: 2.3.1 azure-cli-nspkg: 3.0.4 azure-cli-telemetry: 1.0.4 extensions: aks-preview: 0.4.35 azure-firewall: 0.3.0 connectedk8s: 0.1.3 dev-spaces: 1.0.3 interactive: 0.4.3 k8sconfiguration: 0.1.7
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm.
aks
I have this same issue, it just started today. Was working fine two days ago.
@greggbjensen what CLI version are you using?
I am unable to reproduce this in Cloud Shell having the following versions:
$ az --version
azure-cli 2.5.1 *
command-modules-nspkg 2.0.3
core 2.5.1 *
nspkg 3.0.4
telemetry 1.0.4
@swgriffith, @greggbjensen - can you try passing in the argument --workspace-resource-id along with a Log Analytics resource ID? This should avoid triggering the implicit ARM deployment which is likely leading to the error.
Example:
az aks create --resource-group github-13404 --name aks-github-13404 --enable-addons monitoring --workspace-resource-id /subscriptions/{SUBSCRIPTION_ID}/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/{WORKSPACE_NAME}
@Jen7714 here is my CLI version information:
$ az --version
azure-cli 2.6.0
command-modules-nspkg 2.0.3
core 2.6.0
nspkg 3.0.4
telemetry 1.0.4
Extensions:
aks-preview 0.4.27
dev-spaces 1.0.5
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\xxx\.azure\cliextensions'
Python (Windows) 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
I just recreated in the azure cloud shell: Azure-cli Azure-cli-command-modules-nspkg Azure-cli-coreAzure-cli-nspkg Azure-cli-telemetry
2.7.0 2.0.3 2.7.03.0.4 1.0.4
steve@Azure:~$ az aks create -n $CLUSTERNAME -g $RGNAME \
--kubernetes-version $K8SVERSION
--service-principal $APPID
--client-secret $CLIENTSECRET
--generate-ssh-keys -l $LOCATION
--node-count 3
--enable-addons monitoring
--no-wait
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.'.
This issue is fixed. Please upgrade to the latest version of az cli 2.39.0