Creating Nodepool with Avaibility Zones using AZ Cli 2.40 errors out
See original GitHub issue
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Related command
az aks nodepool add `
--resource-group "$ResourceGroup" `
--name "$NodePoolName" `
--cluster-name "$AKSClusterName" `
--enable-cluster-autoscaler `
--node-count $MinNodes `
--min-count $MinNodes `
--max-count $MaxNodes `
--node-vm-size "$NodeSKU" `
--zones 1, 2 `
--labels nodepool=$NodePoolLabel
Describe the bug
Using azure cli nodepool command to create a nodepool with 2 availability zones enabled in AKS. Azure Cli version 2.40.0 errors out with below error:-
az aks nodepool add: ‘1 2’ is not a valid value for ‘–zones’. Allowed values: 1, 2, 3.
When tried with value as ‘1, 2, 3’, exact same error occurs as:
ERROR: az aks nodepool add: ‘1 2 3’ is not a valid value for ‘–zones’. Allowed values: 1, 2, 3
Exact same command works fine with Azure CLI version 2.38.0. It appears that azure cli 2.40 is somehow omitting the comma.
To Reproduce
Run az aks nodepool add command with zones value as –zones = 1, 2 or with –zones = 1, 2, 3 on azure cli 2.40 .0 , powershell
Expected behavior
Command should create the aks nodepool with mentioned zones on azure cli version 2.40.0
Environment summary
az version - 2.40.0 Shell- Powershell
Additional context
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@navba-MSFT , Giving zones value without comma’s work as you suggested. However the documentation below mentions to use “,” https://docs.microsoft.com/en-us/cli/azure/aks/nodepool?view=azure-cli-latest#az-aks-nodepool-add
We had azure cli 2.38 previously and -zones 1, 2, 3 was working. It stopped working from 2.40 onwards.
Is now the correct syntax to use without “,”
@nmittal7777 Thanks for your reply. You should be using it without the , (comma). The same has been documented in the example here. Hope this answers. Please feel free to reopen this thread if you have any follow-up questions.