question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 Azure_cli_zones_error

Additional context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nmittal7777commented, Sep 20, 2022

@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 “,”

0reactions
navba-MSFTcommented, Sep 20, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use availability zones in Azure Kubernetes Service (AKS)
Learn how to create a cluster that distributes nodes across availability zones in Azure Kubernetes Service (AKS)
Read more >
azure-cli 2.16.0 - PyPI
The following block creates a new resource group in the 'westus' region, then creates a new Ubuntu VM. We automatically provide a series...
Read more >
Oracle® Private Cloud Appliance Administrator's Guide for ...
This command is in the system path for the root user, so you should be able to run the command from anywhere that...
Read more >
VMware Tanzu Kubernetes Grid 1.5 Documentation
CLI. 46. Node Pools. 47. vSphere. 47. AWS. 49. Windows Workload Clusters ... Deploy Tanzu Kubernetes Clusters to Multiple Availability Zones on.
Read more >
Red Hat OpenShift Service on AWS 4 Cluster administration
Enabling autoscaling nodes in an existing cluster using the rosa CLI ... When you create a machine pool in a multiple availability zone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found