Skip to content

az cli command from install guide evaluates with empty value #1591

Closed
@effelow

Description

@effelow

Describe the bug
az command this line from the install.md

az aks get-versions --location $location --query "orchestrators[-1].orchestratorVersion" -o tsv

To Reproduce

  1. Go to cloudshell
  2. paste the command
    location="westus2"
    kubernetesVersion=$(az aks get-versions --location $location --query "orchestrators[-1].orchestratorVersion" -o tsv)
    echo $kubernetesVersion
    
    Notive the variable $kubernetesVersion is empty.

Solution

Replace --queryparameter like so "values[?isDefault==`true`].version | [0]"

kubernetesVersion=$(az aks get-versions --location $location --query "values[?isDefault==\`true\`].version | [0]" -o tsv)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions