Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.69k stars 5.11k forks source link

AKS vnetSubnetID not filled for agentPoolProfiles #8494

Open aristosvo opened 4 years ago

aristosvo commented 4 years ago

Problem

Endpoint returns for my newer AKS clusters no vnetSubnetID in agentPoolProfiles

Endpoint

https://management.azure.com:443 "GET /subscriptions/{subscription}/providers/Microsoft.ContainerService/managedClusters?api-version=2019-10-01 HTTP/1.1"

Response example of a newer cluster

"agentPoolProfiles": [
      {
        "availabilityZones": null,
        "count": 3,
        "enableAutoScaling": false,
        "enableNodePublicIp": false,
        "maxCount": null,
        "maxPods": 110,
        "minCount": null,
        "name": "nodepool1",
        "nodeTaints": null,
        "orchestratorVersion": "1.15.7",
        "osDiskSizeGb": 100,
        "osType": "Linux",
        "provisioningState": "Succeeded",
        "scaleSetEvictionPolicy": null,
        "scaleSetPriority": null,
        "type": "VirtualMachineScaleSets",
        "vmSize": "Standard_DS2_v2"
      }
    ],

Response example of an older cluster (probably created via Azure Portal)

"agentPoolProfiles": [
      {
        "availabilityZones": null,
        "count": 3,
        "enableAutoScaling": null,
        "enableNodePublicIp": false,
        "maxCount": null,
        "maxPods": 30,
        "minCount": null,
        "name": "agentpool",
        "nodeTaints": null,
        "orchestratorVersion": "1.15.7",
        "osDiskSizeGb": 100,
        "osType": "Linux",
        "provisioningState": "Succeeded",
        "scaleSetEvictionPolicy": null,
        "scaleSetPriority": null,
        "type": "AvailabilitySet",
        "vmSize": "Standard_DS2_v2",
        "vnetSubnetId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Network/virtualNetworks/{vnetid}/subnets/default"
      }
    ],
ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm.

djsly commented 4 years ago

I just check with the following API Version

https://management.azure.com/subscriptions/{subscription}/resourceGroups/{rg}/providers/Microsoft.ContainerService/managedClusters/{cluster}?api-version=2020-03-01

I'm getting the expected value

"agentPoolProfiles": [
      {
        "name": "nodepool1",
        "count": 3,
        "vmSize": "Standard_D8s_v3",
        "osDiskSizeGB": 64,
        "vnetSubnetID": "/subscriptions/{subid}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}",
        "maxPods": 35,
        "type": "VirtualMachineScaleSets",
        "maxCount": 30,
        "minCount": 3,
        "enableAutoScaling": true,
        "provisioningState": "Succeeded",
        "orchestratorVersion": "1.15.10",
        "enableNodePublicIP": false,
        "nodeTaints": [
          "key=value:NoSchedule",
          "key=value:NoExecute"
        ],
        "mode": "User",
        "osType": "Linux"
      },
      {
        "name": "linux",
        "count": 2,
        "vmSize": "Standard_B8ms",
        "osDiskSizeGB": 64,
        "vnetSubnetID": "/subscriptions/{subid}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}",
        "maxPods": 30,
        "type": "VirtualMachineScaleSets",
        "maxCount": 20,
        "minCount": 1,
        "enableAutoScaling": true,
        "provisioningState": "Succeeded",
        "orchestratorVersion": "1.15.10",
        "enableNodePublicIP": false,
        "mode": "User",
        "osType": "Linux"
      }
    ],