URL has been copied successfully!
URL has been copied successfully!
URL has been copied successfully!
URL has been copied successfully!
URL has been copied successfully!
Share:
Twitter
LinkedIn
Facebook
Reddit
Follow by Email
Copy link
Threads
Bluesky
Reading Time: 7 minutes

I spotted this in the AKS release notes recently and it is worth paying attention to if you are running multi-zone clusters. Microsoft has added managedNATGatewayV2 as a new outbound type for AKS, and the key difference from the existing managedNATGateway is zone redundancy. The original option is tied to a single availability zone. If that zone has a problem, your egress goes with it. V2 uses the StandardV2 NAT gateway SKU, which is zone-redundant by default without you having to configure anything.

This is currently in public preview, so it is not covered by the AKS SLA and not recommended for production workloads yet.

Why this matters

If you are already spreading your node pools across availability zones, your compute layer has zone redundancy but your egress does not if you are using managedNATGateway. That is an asymmetry worth fixing. StandardV2 also brings IPv6 outbound support and flow logs, neither of which are available on the Standard SKU.

The comparison is straightforward:

managedNATGatewaymanagedNATGatewayV2
NAT gateway SKUStandardStandardV2
Zone redundancyNo (single zone)Yes (built in)
IPv6 outboundNoYes
Flow logsNoYes
Public IP SKU requiredStandardStandardV2
Outbound IP model immutableNoYes
StatusGAPreview

The immutability row is the one to pay attention to. With managedNATGatewayV2, your choice between Azure-managed IPs and customer-defined IPs is locked at cluster creation. You cannot switch models with az aks update after the fact. That is a real design decision, not a footnote.

How to enable it

You need the aks-preview CLI extension at version 20.0.0b1 or later. Install or update it first.

Then register the ManagedNATGatewayV2Preview feature flag. This can take a few minutes to propagate.

Wait until the show command returns "state": "Registered", then refresh the provider registration.

Azure-managed IPs

The simpler path is letting Azure own the outbound IPs. You specify a count and AKS handles the rest.

Azure provisions a StandardV2 NAT gateway with one managed outbound IPv4 address. For dual-stack egress, add --nat-gateway-managed-outbound-ipv6-count 1 as well.

After creation, you can update the IP count and the idle timeout without recreating the cluster.

Customer-defined IPs

If external services need to allowlist your egress addresses, or you want the IPs to survive a cluster recreate, bring your own. The catch is that StandardV2 NAT gateway requires StandardV2 public IPs. Existing Standard SKU public IPs will not work, so you need to create new ones.

The commands below create a zone-redundant public IP and a public IP prefix, then create the cluster referencing them. The --zone 1 2 3 on the IP resources matters. A zone-redundant NAT gateway backed by zonal IPs would create a zone-specific dependency that defeats the point.

You can update which IPs are assigned later, but you cannot switch to Azure-managed IPs. The model you choose at creation is permanent.

Bicep

The natGatewayProfile property is fully documented in the ARM schema. managedNATGatewayV2 is a valid outboundType value as of the 2026-01-02-preview API version, which is the latest as of writing.

For the Azure-managed IP approach, the cluster resource looks like this. The managedOutboundIPProfile block handles both IPv4 and IPv6 counts, and the outboundIPPrefixes property is V2-only so you will not find it documented against managedNATGateway.

For customer-defined IPs, declare the public IP resources first and reference them in the natGatewayProfile. The sku.name: 'StandardV2' is required on both the IP and the prefix; Standard SKU resources will cause a deployment failure.

Bicep will deploy the IP resources before the cluster due to the implicit dependency on natPublicIp.id and natPublicIpPrefix.id, so the ordering is handled for you.

Verifying after creation

Once the cluster is up, confirm the NAT gateway was provisioned in the node resource group.

You should see one entry with ProvisioningState: Succeeded. To check the full outbound IP configuration including idle timeout, query the cluster’s NAT gateway profile directly.

One thing I noticed: there is no zones property on the NAT gateway resource in the node resource group. That is not an oversight. Zone redundancy is implicit in StandardV2 and does not show up as a configurable property the way it does on Standard SKU resources where you pick a specific zone.

Migrating an existing cluster

If you have an existing cluster running loadBalancer or managedNATGateway, you can migrate to V2 using az aks update without recreating the cluster. There is one thing to understand before you run anything: this migration changes your cluster’s outbound IP addresses and involves a period of network disruption. Existing connections will drop. If you have firewall rules or authorized IP ranges configured around your current egress IPs, update them before or immediately after the migration.

The supported migration paths to managedNATGatewayV2 on managed VNets are:

FromSupported
loadBalancerYes
managedNATGatewayYes
noneYes
blockYes

There is no currently supported path out of managedNATGatewayV2 on a managed VNet (this might change once GA). Once you migrate to V2, the only way back to a different outbound type is a cluster recreate. That is worth sitting with before you run the command on anything you care about.

Before you migrate

The migration will replace your cluster’s egress IPs with new ones provisioned on the StandardV2 NAT gateway. Before you start, capture what IPs you are currently using so you know exactly what to update afterwards.

For a loadBalancer cluster, the outbound IPs are on the load balancer in the node resource group. This command pulls the current outbound IP addresses and their associated resource IDs.

For a managedNATGateway cluster, the IPs are on the NAT gateway resource directly.

Take note of the actual IP addresses, not just the resource IDs. You can resolve them with az network public-ip show --ids <id> --query ipAddress -o tsv. Once you have the full list, check it against any firewall rules, NSG rules, API server authorized IP ranges, and third-party allowlists before proceeding. Updating those after the migration while outbound traffic is broken is not a good place to be.

From loadBalancer

This is probably the most common starting point. The command below migrates a cluster from the default load balancer egress to managedNATGatewayV2 with Azure-managed IPs. You need at least Azure CLI version 2.56 for outbound type migration; run az upgrade if you are not sure.

AKS will provision a new StandardV2 NAT gateway and detach the load balancer from egress. Expect a brief outage on outbound connections during the transition.

From managedNATGateway

Migrating from V1 to V2 follows the same pattern. The cluster already has a managed NAT gateway in place; AKS replaces it with a StandardV2 one.

After the update completes, confirm the NAT gateway in the node resource group has been replaced by checking the SKU on the resource.

The SKU column should show StandardV2. If you had firewall rules allowing your old NAT gateway IP, update them now with the new egress address from the cluster’s NAT gateway profile.

Wrapping up

managedNATGatewayV2 is still in preview and I would treat it that way. Enable it on dev and staging clusters now so you understand the behaviour and work through the IP model decision before it matters. Do not deploy it to production until GA unless you are comfortable with preview caveats.

The thing I keep coming back to is the outbound IP model immutability. That decision is permanent at cluster creation. Before you create any cluster with V2, answer the question: do any external systems need to allowlist your egress addresses? If yes, bring your own StandardV2 IPs. If no, let Azure manage them. Getting that wrong means a cluster recreate.

For multi-zone clusters, managedNATGatewayV2 is clearly the better option once it reaches GA. Zone-redundant compute paired with zone-redundant egress is the correct setup, and V2 gets you there without any additional configuration.

The one-way migration constraint is worth flagging to your team before anyone runs az aks update. Once a managed VNet cluster is on V2, it stays there. Plan the migration, update your firewall rules ahead of time, and schedule the downtime window properly rather than treating it as a quick update.

Share:
Twitter
LinkedIn
Facebook
Reddit
Follow by Email
Copy link
Threads
Bluesky

Pixel Robots.

I’m Richard Hooper aka Pixel Robots. I started this blog in 2016 for a couple reasons. The first reason was basically just a place for me to store my step by step guides, troubleshooting guides and just plain ideas about being a sysadmin. The second reason was to share what I have learned and found out with other people like me. Hopefully, you can find something useful on the site.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *