Closed azkamil closed 2 years ago
The lib is in maintenance. Please plan switch to https://aka.ms/azsdk/dotnet/mgmt
For now (before the new lib release), use azure.KubernetesClusters.Manager.Inner.ContainerServices.ListOrchestratorsAsync(region.Name, "managedClusters")
Describe the bug
Here I will show how results from SDK and az aks are different
a) IKubernetesClusters.KubernetesClusters.ListKubernetesVersions(region) delivers not the full list of available kubernetes versions b) az aks get-upgrades --resource-group {groupname}--name {clustername} delivers proper list
resuts a) aks versions 1.13. to 1.19. b) 1.22.4, 1.22.6 (our cluster is currently 1.21.9)
underlying web requests () a) got with fiddler proxy https://management.azure.com/subscriptions/fcc20765-6b87-470c-bfdf-253c1299e7a3/providers/Microsoft.ContainerService/locations/eastus2/orchestrators?api-version=2019-08-01 b) got with --debug option for az command https://management.azure.com/subscriptions/fcc20765-6b87-470c-bfdf-253c1299e7a3/providers/Microsoft.ContainerService/locations/eastus2/orchestrators?api-version=2019-04-01&resource-type=managedClusters'
Exception or Stack Trace no exception
To Reproduce Run az command and code snippet
Code Snippet var azure = Microsoft.Azure.Management.Fluent.Azure.Configure().Authenticate(azureCredentials).WithSubscription(subId); var versions = azure.KubernetesClusters.ListKubernetesVersions(Region.USEast2); foreach (var v in versions) { Console.WriteLine(v); }
Expected behavior the versions 1.22.* in result list.
Screenshots not necessary
Setup (please complete the following information): Windows 10 Visual Studio sdk version: 1.38 latest
Additional context none
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report