From d7e2e76e2dae48b1ebc7b34944a2adc8ddfc1300 Mon Sep 17 00:00:00 2001 From: Florian Knip Date: Tue, 6 Feb 2024 16:20:35 +0100 Subject: [PATCH 1/2] docs: The json output format might have changed since the creation of this guide. fixing --query parameter to follow up on the change --- docs/setup/install-new.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup/install-new.md b/docs/setup/install-new.md index de3cd202a..32e9a7fd6 100644 --- a/docs/setup/install-new.md +++ b/docs/setup/install-new.md @@ -46,7 +46,7 @@ Follow the steps below to create an Azure Active Directory (AAD) [service princi 1. Execute the commands below on the [Cloud Shell](https://shell.azure.com/) too. This will create the `kubernetesVersion` variable and save the latest version of kubernetes that is available in the location specified. ```bash location="westus2" - kubernetesVersion=$(az aks get-versions --location $location --query "orchestrators[-1].orchestratorVersion" -o tsv) + kubernetesVersion=$(az aks get-versions --location $location --query "values[?isDefault==\`true\`].version | [0]" -o tsv) ``` 1. Paste the entire command below (it is a single command on multiple lines) in [Cloud Shell](https://shell.azure.com/) to create the `parameters.json` file. It will be used in the ARM template deployment. From 2632a1aa7b1eb094cb252990d4cdd1e6706c3bfc Mon Sep 17 00:00:00 2001 From: Florian Knip Date: Tue, 6 Feb 2024 17:55:27 +0100 Subject: [PATCH 2/2] docs: Fix prevsious commit since version since deploymend template.json requires version in the format major.minor.patch --- docs/setup/install-new.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/setup/install-new.md b/docs/setup/install-new.md index 32e9a7fd6..9b627ab62 100644 --- a/docs/setup/install-new.md +++ b/docs/setup/install-new.md @@ -46,7 +46,8 @@ Follow the steps below to create an Azure Active Directory (AAD) [service princi 1. Execute the commands below on the [Cloud Shell](https://shell.azure.com/) too. This will create the `kubernetesVersion` variable and save the latest version of kubernetes that is available in the location specified. ```bash location="westus2" - kubernetesVersion=$(az aks get-versions --location $location --query "values[?isDefault==\`true\`].version | [0]" -o tsv) + patchedVersions=$(az aks get-versions --location $location --query "values[?isDefault==\`true\`].patchVersions" -o json) + kubernetesVersion=$(echo $patchedVersions | jq -r 'map(keys[]) | sort_by(split(".") | map(tonumber)) | .[-1]') ``` 1. Paste the entire command below (it is a single command on multiple lines) in [Cloud Shell](https://shell.azure.com/) to create the `parameters.json` file. It will be used in the ARM template deployment.