|
1 | 1 | ---
|
2 |
| -title: Troubleshoot no K8s versions or VM sizes listed when you create an AKS Arc cluster |
3 |
| -description: Learn how to troubleshoot no K8s versions or VM sizes listed when you create an AKS Arc cluster. |
| 2 | +title: Troubleshoot K8sVersionValidation error code |
| 3 | +description: Learn how to troubleshoot the K8sVersionValidation error code. |
4 | 4 | ms.topic: troubleshooting
|
5 | 5 | author: sethmanheim
|
6 | 6 | ms.author: sethm
|
7 |
| -ms.date: 10/02/2024 |
8 |
| -ms.reviewer: sumsmith |
| 7 | +ms.date: 11/22/2024 |
| 8 | +ms.reviewer: abha |
9 | 9 |
|
10 | 10 | ---
|
11 | 11 |
|
12 |
| -# Troubleshoot no K8s versions or VM sizes listed when you create an AKS Arc cluster |
| 12 | +# Troubleshoot K8sVersionValidation error code |
13 | 13 |
|
14 |
| -The **kubernetesVersions/default** or the **skus/default** resource in Azure is not yet created, or was deleted for some reason. This scenario can happen in older releases when the default resource was not created as a part of the deployment. |
| 14 | +This article describes how to identify and resolve the K8sVersionValidation error code that occurs when you try to create and deploy an AKS cluster on Azure Local. |
15 | 15 |
|
16 |
| -## Workaround |
| 16 | +## Symptoms |
17 | 17 |
|
18 |
| -Run the following command: |
| 18 | +When you try to create an AKS Arc cluster, you receive one of the following error messages: |
| 19 | + |
| 20 | +- `Kubernetes version 1.27.7 is not ready for use on Linux. Please go to https://aka.ms/aksarccheckk8sversions for details of how to check the readiness of Kubernetes versions` |
| 21 | +- `Kubernetes version 1.26.12 is not supported. Please go to https://aka.ms/aksarcsupportedversions for details about the supported Kubernetes version on this platform.` |
| 22 | +- `Admission webhook \'vhybridakscluster.kb.io\' denied the request: Kubernetes version 1.26.12 is not available` |
| 23 | + |
| 24 | +## Error messages |
| 25 | + |
| 26 | +This section describes the error messages that you might see when you encounter the K8sVersionValidation error code. |
| 27 | + |
| 28 | +### Kubernetes version 1.27.7 is not ready for use on Linux |
| 29 | + |
| 30 | +This error message is caused by an incomplete Linux VHD download. |
| 31 | + |
| 32 | +When you install Azure Local, you download a Linux VHD of approximately 4-5 GB in size. This Linux VHD is used to create the underlying VMs for the Kubernetes nodes in your AKS Arc cluster. The error message can occur when your Linux VHD didn't finish downloading. To resolve this issue, you should wait until your internet connection finishes downloading the Linux VHD image. |
| 33 | + |
| 34 | +To check if the image download is in progress or finished, run the following command: |
| 35 | + |
| 36 | +```azurecli |
| 37 | +$cl_id = "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.ExtendedLocation/customLocations/<custom_location_name>" |
| 38 | + |
| 39 | +# Get the kubernetes version using CLI (it automatically creates the **kubernetesVersions/default** Azure resource). |
| 40 | +az aksarc get-versions --custom-location $cl_id |
| 41 | +``` |
| 42 | + |
| 43 | +If this command says that the K8s versions are ready, and you're running Azure Local [release 2411](/azure/aks/hybrid/aks-whats-new-23h2#release-2411) or newer, file a [support request](help-support.md). |
| 44 | + |
| 45 | +If you're running Azure Local release 2408 or older, proceed to the next section. We strongly recommend that you upgrade your Azure Local deployment to the latest version, in order to get the latest bug fixes and security updates. |
| 46 | + |
| 47 | +#### Recreate kubernetesVersions/default |
| 48 | + |
| 49 | +If you redeploy Azure Local with the same name and parameters, you might have to recreate **kubernetesVersions/default**. To do so, run the following commands: |
| 50 | + |
| 51 | +```azurecli |
| 52 | +$subscription = <subscription_id> |
| 53 | +$cl_id = <custom_location_id> |
| 54 | +
|
| 55 | +az login --use-device-code |
| 56 | +az account set -s $subscription |
| 57 | +$token = $(az account get-access-token --query accessToken) |
| 58 | +$url = "https://management.azure.com${cl_id}/providers/Microsoft.HybridContainerService/kubernetesVersions/default?api-version=2024-01-01" |
| 59 | +
|
| 60 | +# Get the Kubernetes version Azure resource |
| 61 | +az rest --headers "Authorization=Bearer $token" "Content-Type=application/json;charset=utf-8" --uri $url --method GET |
| 62 | +
|
| 63 | +# Delete the Kubernetes version Azure resource |
| 64 | +az rest --headers "Authorization=Bearer $token" "Content-Type=application/json;charset=utf-8" --uri $url --method DELETE |
| 65 | +
|
| 66 | +# Get the Kubernetes version using CLI (it automatically creates the Kubernetes version Azure resource) |
| 67 | +az aksarc get-versions --custom-location $cl_id |
| 68 | +``` |
| 69 | + |
| 70 | +#### Can't see the Kubernetes versions or VM size options on the Azure portal |
| 71 | + |
| 72 | +This scenario can happen in Azure Local releases 2408 or older, when the default resource for Kubernetes version (or VM sizes) was not created as a part of the Azure Local deployment. |
| 73 | + |
| 74 | +To resolve this issue, run the following command: |
19 | 75 |
|
20 | 76 | ```azurecli
|
21 | 77 | $cl_id = "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.ExtendedLocation/customLocations/<custom_location_name>"
|
22 | 78 |
|
23 |
| -# Get the kubernetes version or the VM sizes using CLI (it automatically creates the **kubernetesVersions/default** or the **skus/default** azure resource). |
| 79 | +# Get the kubernetes version using CLI (it automatically creates the **kubernetesVersions/default** Azure resource). |
24 | 80 |
|
25 | 81 | az aksarc get-versions --custom-location $cl_id
|
26 |
| -az aksarc vmsize list --custom-location $cl_id |
27 | 82 | ```
|
28 | 83 |
|
29 |
| -## Validation |
| 84 | +### Kubernetes version 1.26.12 is not supported |
30 | 85 |
|
31 |
| -Verify that the portal displays the correct list of supported K8s versions and VM sizes. See [this list of supported K8s versions](aks-whats-new-23h2.md#release-2408) for each Azure Local release. |
| 86 | +Azure Local supports specific Kubernetes versions in each of its releases. As stated in the error message, go to `https://aka.ms/aksarcsupportedversions` for a list of supported Kubernetes versions based on your deployed Azure Local release. |
32 | 87 |
|
33 | 88 | ## Next steps
|
34 | 89 |
|
35 |
| -[Known issues in AKS enabled by Azure Arc](aks-known-issues.md) |
| 90 | +[Troubleshoot issues in AKS enabled by Azure Arc](aks-troubleshoot.md) |
0 commit comments