We sometimes come across issues such as shown below while trying to deploy AKS clusters. It could be due to diffrent reasons. One such case is the below one where there is no availability for the VM size in zone 2 in the region but it has availability in other two regions.
performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with response: {
│ "code": "AvailabilityZoneNotSupported",
│ "details": null,
│ "message": "The zone(s) '2' for resource 'vkdefault' is not supported. The supported zones for location 'eastus2' are '1,3'",
│ "subcode": "",
│ "target": "agentPoolProfile.availabilityZone"
│ }
We can run below command with the VM size tried for AKS as shown below to check the availability in the region.
az vm list-skus --location eastus2 --resource-type virtualMachines --size Standard_D2as_v7 --output table
As we can see, the VM size is only available in zones 1 and 3. But not available in zone 2. This matches the error message The supported zones for location 'eastus2' are '1,3'"
Since we are trying to deploy to all three availabiltiy zones for AKS VM scaleset the above VM size is not suitable to use.
Since we are trying to deploy to all three availabiltiy zones for AKS VM scaleset the above VM size is not suitable to use.
Then we can try another VM size Standard_D2a_v4. This time it shows zone 2 not available and also none of the zones available.
When we inspect with the below command we can see that the zones are available to use in the region but restricted for the subscription.
For this case it is possible to reach out to Micorosft Azure support and get the restriction lifted as the region has availability.
Or as alternative solution, you could use a VM size that is not restricted to the subscription, and available for all three availability zones in the given Azure region.
No comments:
Post a Comment