Azure / Azure/azure-rest-api-specs

`Microsoft.ContainerService` - some `loadBalancerProfile` properties can be set when `outboundType` is set to `userAssignedNATGateway``

Open
#22,469 1 comment 0 reactions 0 assignees View on GitHub
customer-reported needs-team-attention question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
6k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

Service: `Container Service`
API Version: `2022-09-02-preview`

According to the [MSFT docs](https://learn.microsoft.com/en-us/azure/virtual-network/nat-gateway/nat-overview?WT.mc_id=AZ-MVP-5000119#outbound-connectivity) a NAT Gateway assigned to a subnet will take precedence over any load balancer rules assigned to the same subnet.

In AKS when `outboundType` is set to `userAssignedNATGateway` some `loadBalancerProfile` properties such as `outboundIPPrefixes` can be sent to the API and are accepted but do not actually seem to be set or returned by the API:

The PUT
```
...
"networkProfile": {
"dnsServiceIP": "10.0.0.10",
"dockerBridgeCidr": "172.17.0.1/16",
"loadBalancerProfile": {
"allocatedOutboundPorts": 0,
"idleTimeoutInMinutes": 4,
"outboundIPPrefixes": {
"publicIPPrefixes": [
{
"id": "/subscriptions/***/resourceGroups/***/providers/Microsoft.Network/publicIPPrefixes/acctestipprefix230206112441903773"
}
]
}
},
"loadBalancerSku": "standard",
"networkMode": "",
"networkPlugin": "azure",
"networkPolicy": "",
"outboundType": "userAssignedNATGateway",
"podCidrs": [],
"serviceCidr": "10.0.0.0/16",
"serviceCidrs": []
},
...
```

The GET
```
...
"networkProfile": {
"networkPlugin": "azure",
"loadBalancerSku": "Standard",
"loadBalancerProfile": {
"allocatedOutboundPorts": 0,
"idleTimeoutInMinutes": 4,
"backendPoolType": "nodeIPConfiguration"
},
"serviceCidr": "10.0.0.0/16",
"dnsServiceIP": "10.0.0.10",
"dockerBridgeCidr": "172.17.0.1/16",
"outboundType": "userAssignedNATGateway",
"serviceCidrs": [
"10.0.0.0/16"
],
"ipFamilies": [
"IPv4"
]
},
...
```

In addition some properties are accepted and appear to be set on the cluster e.g. `outboundIPs`

The PUT
```
...
"networkProfile": {
"dnsServiceIP": "10.0.0.10",
"dockerBridgeCidr": "172.17.0.1/16",
"loadBalancerProfile": {
"allocatedOutboundPorts": 0,
"idleTimeoutInMinutes": 4,
"outboundIPs": {
"publicIPs": [
{
"id": "/subscriptions/1a6092a6-137e-4025-9a7c-ef77f76f2c02/resourceGroups/acctestRG-aks-230206133925446833/providers/Microsoft.Network/publicIPAddresses/acctest-PIP-230206133925446833"
}
]
}
},
"loadBalancerSku": "standard",
"networkMode": "",
"networkPlugin": "azure",
"networkPolicy": "",
"outboundType": "userAssignedNATGateway",
"podCidrs": [],
"serviceCidr": "10.0.0.0/16",
"serviceCidrs": []
},
...
```

The GET
```
...
"networkProfile": {
"networkPlugin": "azure",
"loadBalancerSku": "Standard",
"loadBalancerProfile": {
"outboundIPs": {
"publicIPs": [
{
"id": "/subscriptions/1a6092a6-137e-4025-9a7c-ef77f76f2c02/resourceGroups/acctestRG-aks-230206133925446833/providers/Microsoft.Network/publicIPAddresses/acctest-PIP-230206133925446833"
}
]
},
"allocatedOutboundPorts": 0,
"idleTimeoutInMinutes": 4,
"backendPoolType": "nodeIPConfiguration"
},
"serviceCidr": "10.0.0.0/16",
"dnsServiceIP": "10.0.0.10",
"dockerBridgeCidr": "172.17.0.1/16",
"outboundType": "userAssignedNATGateway",
"serviceCidrs": [
"10.0.0.0/16"
],
"ipFamilies": [
"IPv4"
]
},
...
```

Given the docs mentioned above this configuration doesn't seem applicable or relevant. Could we get some clarification in the AKS docs regarding this and have the API return an error if the configuration isn't valid?

Contributor guide

Open the contributing guide

Research direction

Start with the Microsoft.ContainerService API version 2022-09-02-preview schema and the AKS outbound connectivity documentation linked in the issue. Compare the PUT and GET networkProfile examples for outboundType userAssignedNATGateway, then clarify the applicable properties and validation expectations; done means the documentation and API behavior no longer accept or imply unsupported configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, kubernetes
Domain
api, cloud, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.