Repository navigation
Azure CNI (dynamic pod subnets) as primary Site with manageCniPlugin=false: no return path for pod traffic in mesh, gateway hijacks remote node CIDR #921
Description
Summary
Attaching an AKS Flex Node to an existing AKS cluster that uses Azure CNI with dynamic pod subnets (networkPlugin=azure, networkPolicy=calico, podCidr=null, one pod subnet per node pool) using unbounded-net with manageCniPlugin: false on the cluster Site. Cross-site traffic from Azure CNI pods to Flex pods does not work in either mesh or gateway mode without a manual SNAT rule. Is this topology supported, and if so, what is the intended configuration?
Environment
- unbounded v0.12.0 (operator, net-controller, net-node), AKSFlexNode v0.2.0, AKS 1.36.3 (private cluster)
- Cluster: Azure CNI, dynamic pod subnets per pool, Calico policy-only,
podCidrempty, service CIDR10.244.0.0/16 - Example ranges (anonymized): VNet
10.0.0.0/16; one AKS pool with node subnet10.0.0.0/27and pod subnet10.0.2.0/23; Flex node192.168.10.10in192.168.10.0/28; Flex pod CIDR192.168.20.0/24 - Private L3 between the VNet and the Flex network (stateful firewall in the path). Node to node works both ways, including UDP 6081.
unbounded-net-nodelimited viaunbounded-component-overridesto the Flex node plus one AKS node (canary)
Configuration
apiVersion: unbounded-cloud.io/v1alpha3
kind: Site
metadata: {name: cluster}
spec:
manageCniPlugin: false
nodeCidrs: [10.0.0.0/27]
podCidrAssignments:
- cidrBlocks: [10.0.2.0/23]
localCidrs: [10.0.0.0/16]
nonMasqueradeCIDRs: [0.0.0.0/0]
---
apiVersion: unbounded-cloud.io/v1alpha3
kind: Site
metadata: {name: flex-site}
spec:
nodeCidrs: [192.168.10.0/28]
podCidrAssignments:
- cidrBlocks: [192.168.20.0/24]
nodeBlockSizes: {ipv4: 25}
nonMasqueradeCIDRs: [192.168.20.0/24]
---
apiVersion: net.unbounded-cloud.io/v1alpha1
kind: SitePeering
metadata: {name: cluster-flex}
spec:
sites: [cluster, flex-site]
meshNodes: true
tunnelProtocol: GENEVEObserved behavior
Mesh (above):
- The AKS canary gets
spec.podCIDR10.0.12.0/24(outside the declared cluster pool) andunbounded0with source10.0.12.1, and the route192.168.20.0/25 dev unbounded0. - Azure CNI pod
10.0.2.128pings Flex pod192.168.20.6. tcpdump on the AKS node shows the request enteringgeneve0and being encapsulated to192.168.10.10:6081. There is no reply, and the Flex side shows nothing for inner source10.0.2.128. Agent health checks10.0.12.1:9997 <-> 192.168.20.1:9997work both ways. - With a manual rule on the AKS node,
iptables -t nat -I POSTROUTING -o unbounded0 -d 192.168.20.0/24 -j MASQUERADE(SNAT to10.0.12.1), ping and TCP from the Azure CNI pod to the Flex pod work. - So it looks like the Flex side only returns or accepts traffic for sources inside the peer's Unbounded pod block. Azure CNI pod IPs are never in those blocks.
Gateway (GatewayPool type Internal, routedCidrs: [10.0.2.0/23], SiteGatewayPoolAssignments for both sites, SitePeering removed):
- The gateway node gets
192.168.10.0/28 dev unbounded0, i.e. the remote Site's node CIDR. - Its underlay route to the tunnel endpoint
192.168.10.10then goes intounbounded0, and the tunnel breaks (node to Flex node ping fails).
Related, already fixed: with v0.8.0 the cluster Site pod pool was routed into unbounded0 on every agent node, black-holing kubelet to API on Azure CNI nodes. #740 (localCidrs) fixes that in v0.12.0.
Questions
- Is an existing Azure CNI cluster with per-pool pod subnets a supported primary site for
manageCniPlugin: false?hack/scripts/get-aks-cluster-cidrs.shrejects clusters withoutnetworkProfile.podCidr. - Is there a supported way to send unmanaged-CNI pod traffic into the tunnel with a correct return path? For example, SNAT to the node's
unbounded0address, or routing the cluster Site's pod CIDR back via mesh peers. - In gateway mode, how should
nodeCidrsandlocalCidrsbe set so the gateway does not route the remote Site's node IPs (including the tunnel endpoint) throughunbounded0?
We can provide more captures or test patches.
Activity
Lotarcc commentedon Oct 17, 2026
Status update for triage:
unbounded0). unbounded-net v0.2.0: SitePeering mesh (VXLAN) over ExpressRoute routes remote site nodeCidrs into unbounded0 -> VXLAN encapsulation loop, API server private endpoint blackholed #937 reports what looks like the same Q3 problem in mesh mode.Lotarcc commentedon Oct 23, 2026
Status update:
manageCniPlugin: falseSites: Integrate startup-verified IPAM into the node agent #943 (merged).nodeCidrsrouted intounbounded0on gateways: net: should gateways route network-peered Sites' nodeCidrs into unbounded0? #991 asks whether the code or the docs are current.