Introduction
Kubernetes pods normally use a single network interface to communicate with other pods, services, and external systems. For many applications, this default networking model works well. However, some workloads need to communicate through separate networks for security, performance, or integration reasons.
For example, a network security application might need one interface for management traffic and another for inspecting network traffic. A telecommunications workload may need separate interfaces for control-plane and data-plane communication. Similarly, applications that process sensitive data may require dedicated network paths to communicate with specific infrastructure components.
Azure Kubernetes Service (AKS) provides multi-network interface support for pods through its managed DRAnet network driver and Kubernetes Dynamic Resource Allocation (DRA). This capability allows a pod to receive additional network interfaces beyond its standard primary interface.
The feature is currently in preview and requires specific Kubernetes, networking, and node-pool configurations. This article explains its architecture, prerequisites, configuration process, deployment examples, limitations, and production considerations.
Understanding Multi-NIC Networking in AKS
By default, an AKS pod receives a primary network interface, usually named eth0. The Azure Container Network Interface (CNI) plugin manages the pod's primary networking configuration.
This interface handles normal pod communication, including connections to other workloads, Kubernetes services, and external destinations.
With multi-NIC support, a pod can receive one or more additional network interfaces. Each secondary interface connects to a subnet configured on the AKS node pool.
For example, consider an application that requires separate management and data networks.
The pod could have the following interfaces:
| Interface | Purpose | Network |
|---|
| eth0 | Standard Kubernetes communication | Primary subnet |
| eth1 | Application data traffic | Secondary subnet |
| eth2 | Dedicated network integration | Another subnet in the same VNet |
This arrangement allows applications to use different network paths without running separate pods for every network connection.
However, the secondary interfaces are not automatically configured as independent application endpoints. Developers must understand interface addressing, routing, firewall rules, and the application's network behavior.
How Multi-NIC Pods Work in AKS
AKS multi-NIC support uses three important components: secondary network interfaces attached to nodes, Kubernetes Dynamic Resource Allocation, and the managed DRAnet network driver.
Secondary network interfaces on nodes
The first step is to configure additional network interfaces for an AKS node pool.
Each node receives its normal primary interface and the secondary interfaces defined in the node-pool configuration.
These secondary interfaces connect to Azure virtual network subnets. When a pod requests a secondary interface, the network driver makes an available interface accessible inside the pod's network namespace.
Kubernetes Dynamic Resource Allocation
Dynamic Resource Allocation is a Kubernetes mechanism for requesting and assigning specialized resources to workloads.
In this scenario, DRA manages secondary network interfaces as allocatable resources.
Three Kubernetes resources are important:
DeviceClass: Defines the type of network device that a workload can request.
ResourceClaimTemplate: Defines the resource requirements for a workload.
ResourceClaim: Represents the resource allocation associated with a pod.
A pod references a ResourceClaimTemplate. Kubernetes creates the corresponding claim and uses the scheduler and resource driver to allocate an available interface.
This approach makes network interface assignment part of the normal Kubernetes scheduling process.
Managed DRAnet network driver
AKS provides a managed DRAnet network driver that runs as a DaemonSet on the nodes.
The driver discovers available secondary interfaces and publishes them as DRA resources. When Kubernetes allocates an interface to a pod, the driver attaches it to the pod's network namespace.
The pod can then see the additional interface alongside its primary interface.
Prerequisites
Before configuring multi-NIC networking, verify the following requirements.
| Requirement | Description |
|---|
| AKS feature | Multi-NIC preview must be registered |
| Kubernetes version | Kubernetes 1.35 or later for the documented configuration |
| Operating system | Linux node pools |
| Networking | Azure CNI with the Cilium data plane |
| Virtual network | Secondary interfaces must use the same VNet as the primary interface |
| VM size | Must support the primary NIC and all configured secondary NICs |
| NIC allocation | Each secondary NIC can be assigned to only one pod at a time |
The preview documentation also states that secondary NICs cannot connect to different virtual networks. With a customer-managed VNet, different subnets within the same VNet are supported. With an AKS-managed VNet, secondary interfaces are currently limited to the same subnet as the primary interface.
Because this capability is in preview, its availability and requirements can change. Verify the latest AKS documentation and regional support before starting the configuration.
Step-by-Step Configuration
The following example creates an AKS cluster with a primary subnet and a secondary subnet. It then adds a node pool with additional network interfaces and deploys a pod that requests one of those interfaces.
Install the AKS preview extension
First, install or update the Azure CLI preview extension.
az extension add --name aks-preview
az extension update --name aks-preview
Register the multi-NIC preview feature:
az feature register \
--namespace Microsoft.ContainerService \
--name NetworkingMultiNICPreview
Check the registration status:
az feature show \
--namespace Microsoft.ContainerService \
--name NetworkingMultiNICPreview \
--query properties.state \
--output tsv
Wait until the feature registration state is Registered.
Refresh the Microsoft.ContainerService resource provider:
az provider register \
--namespace Microsoft.ContainerService
Create the virtual network and subnets
Create a virtual network with separate primary and secondary subnets.
Set the required environment variables:
export LOCATION="eastus"
export RESOURCE_GROUP="aks-multinic-rg"
export CLUSTER_NAME="aks-multinic-cluster"
export VNET="aks-multinic-vnet"
export PRIMARY_SUBNET="primary-subnet"
export SECONDARY_SUBNET="secondary-subnet"
export NODEPOOL="multinicpool"
export NODE_VM_SIZE="Standard_D8s_v5"
Create the resource group:
az group create \
--name $RESOURCE_GROUP \
--location $LOCATION
Create the virtual network and primary subnet:
az network vnet create \
--resource-group $RESOURCE_GROUP \
--name $VNET \
--location $LOCATION \
--address-prefixes 192.168.0.0/16 \
--subnet-name $PRIMARY_SUBNET \
--subnet-prefixes 192.168.0.0/24
Create the secondary subnet:
az network vnet subnet create \
--resource-group $RESOURCE_GROUP \
--vnet-name $VNET \
--name $SECONDARY_SUBNET \
--address-prefixes 192.168.1.0/24
Retrieve both subnet resource IDs:
PRIMARY_SUBNET_ID=$(az network vnet subnet show \
--resource-group $RESOURCE_GROUP \
--vnet-name $VNET \
--name $PRIMARY_SUBNET \
--query id -o tsv)
SECONDARY_SUBNET_ID=$(az network vnet subnet show \
--resource-group $RESOURCE_GROUP \
--vnet-name $VNET \
--name $SECONDARY_SUBNET \
--query id -o tsv)
These resource IDs are required when creating the AKS cluster and configuring the additional interfaces.
Create the AKS cluster
Create the base cluster using Azure CNI and the Cilium data plane.
az aks create \
--resource-group $RESOURCE_GROUP \
--name $CLUSTER_NAME \
--location $LOCATION \
--vnet-subnet-id $PRIMARY_SUBNET_ID \
--network-plugin azure \
--network-dataplane cilium \
--node-count 1 \
--kubernetes-version 1.35 \
--generate-ssh-keys
Use a Kubernetes version supported by your selected AKS region and subscription. If the requested version is unavailable, select an eligible version that meets the multi-NIC preview requirements.
Check the virtual machine network interface limit
Each Azure virtual machine size supports a maximum number of network interfaces.
Before creating the node pool, check whether the selected VM size can support the primary interface and all additional interfaces.
az vm list-skus \
--location $LOCATION \
--resource-type virtualMachines \
--all \
--query "[?name=='Standard_D8s_v5'].{
SKU:name,
MaxNICs:capabilities[?name=='MaxNetworkInterfaces']|[0].value,
AcceleratedNetworking:capabilities[?name=='AcceleratedNetworkingEnabled']|[0].value
}" \
--output table
For example, if a node needs one primary interface and two secondary interfaces, its VM size must support at least three network interfaces.
Also consider the number of nodes in the pool and the available IP addresses in each subnet.
Add a multi-NIC node pool
Create a configuration file named secondary-nics.json.
[
{
"type": "Standard",
"vnetSubnetId": "SECONDARY_SUBNET_RESOURCE_ID"
},
{
"type": "Standard",
"vnetSubnetId": "SECONDARY_SUBNET_RESOURCE_ID"
}
]
Replace SECONDARY_SUBNET_RESOURCE_ID with the actual secondary subnet resource ID.
Each object represents one secondary network interface to attach to every node in the pool.
Add the node pool:
az aks nodepool add \
--resource-group $RESOURCE_GROUP \
--cluster-name $CLUSTER_NAME \
--name $NODEPOOL \
--node-count 2 \
--node-vm-size $NODE_VM_SIZE \
--secondary-network-interfaces @secondary-nics.json
The secondary NIC configuration is immutable after the node pool is created. If you need a different set of secondary interfaces, create another node pool and move the workloads to it.
Validate the node pool
Retrieve the cluster credentials:
az aks get-credentials \
--resource-group $RESOURCE_GROUP \
--name $CLUSTER_NAME
Inspect the node pool configuration:
az aks nodepool show \
--resource-group $RESOURCE_GROUP \
--cluster-name $CLUSTER_NAME \
--name $NODEPOOL \
--query "{name:name,vmSize:vmSize,secondaryNetworkInterfaces:networkProfile.secondaryNetworkInterfaces}" \
--output json
Check the Kubernetes nodes:
kubectl get nodes -L agentpool
Confirm that the new node pool is available before deploying workloads that require secondary interfaces.
Requesting a Secondary NIC Through DRA
After creating the multi-NIC node pool, AKS deploys the managed DRAnet driver.
The next step is to verify the available device classes and create a resource claim template.
Verify the device class
List the available device classes:
kubectl get deviceclasses
Inspect the standard secondary NIC device class:
kubectl describe deviceclass standard-secondary-nic
Use the device class name published by the driver in your cluster. The example uses standard-secondary-nic.
Create a ResourceClaimTemplate
Create a file named secondary-nic-claim-template.yaml.
apiVersion: resource.k8s.io/v1
kind: ResourceClaimTemplate
metadata:
name: secondary-nic-claim-template
spec:
spec:
devices:
requests:
- name: secondary-nic
exactly:
count: 1
allocationMode: ExactCount
deviceClassName: standard-secondary-nic
This template requests exactly one secondary NIC for each pod that uses it.
Apply the resource:
kubectl apply -f secondary-nic-claim-template.yaml
Verify that it was created:
kubectl get resourceclaimtemplate
Deploy a pod with a secondary NIC
Create a file named secondary-nic-test-pod.yaml.
apiVersion: v1
kind: Pod
metadata:
name: secondary-nic-test-pod
spec:
resourceClaims:
- name: secondary-nic-claim
resourceClaimTemplateName: secondary-nic-claim-template
containers:
- name: multinic-container
image: nicolaka/netshoot
command:
- sh
- -c
- ip a; sleep 3600
resources:
claims:
- name: secondary-nic-claim
The pod references the ResourceClaimTemplate and requests the resulting claim through its container resource requirements.
Deploy the pod:
kubectl apply -f secondary-nic-test-pod.yaml
Check its status:
kubectl get pod secondary-nic-test-pod
Inspect the interfaces from inside the container:
kubectl exec -it secondary-nic-test-pod -- ip addr
The output should show the primary interface and the additional interface allocated to the pod.
You can also inspect the resource claims:
kubectl get resourceclaims
This confirms that Kubernetes created the claim and that the workload requested a secondary network resource.
Security and Networking Considerations
Multi-NIC networking introduces additional security responsibilities. An extra interface can provide access to a different subnet, but it does not automatically provide network isolation.
Network policy enforcement
AKS network policies are enforced only on the primary NIC in this preview implementation.
Traffic flowing through secondary interfaces bypasses AKS network policy enforcement. Therefore, do not assume that a Kubernetes NetworkPolicy protects traffic using eth1 or another secondary interface.
Use Azure network security groups, firewall rules, and other appropriate network controls to restrict access.
Public IP exposure
Secondary NICs with public IP addresses can bypass the Azure Load Balancer and SNAT. This can expose workloads directly to the internet.
Avoid assigning public IP addresses to secondary interfaces unless the architecture specifically requires them. If public connectivity is necessary, configure appropriate NSG and firewall rules to restrict inbound and outbound traffic.
Routing and interface selection
Applications must use the correct interface and routing configuration for their intended traffic.
A pod with multiple interfaces does not automatically know which interface should handle each destination. Incorrect routing can cause asymmetric traffic, failed connections, or unexpected source IP selection.
Test application connectivity through every interface before deploying the workload into a critical environment.
Common Mistakes to Avoid
Selecting an unsupported VM size
A VM size with insufficient network interface capacity cannot support the requested configuration. Always verify the maximum NIC count before creating the node pool.
Using different virtual networks
The current preview requires secondary interfaces to connect to the same VNet as the primary interface. Different subnets within that VNet are supported in the documented bring-your-own VNet configuration, but different VNets are not.
Expecting one NIC to serve multiple pods
Each secondary NIC can be allocated to only one pod at a time. Plan the number of secondary interfaces according to the workloads that need them.
Ignoring network policy limitations
Secondary interface traffic bypasses AKS network policy enforcement in the current preview. Apply network security controls outside the Kubernetes network policy mechanism.
Changing NIC configuration on an existing node pool
The secondary NIC list is immutable after node-pool creation. Create a new node pool if the interface configuration needs to change.
Advantages and Disadvantages
| Advantages | Disadvantages |
|---|
| Supports separate network paths for workloads | Currently a preview capability |
| Uses Kubernetes DRA for resource allocation | Requires a compatible Kubernetes version |
| Integrates with AKS-managed DRAnet driver | Linux node pools only |
| Supports secondary interfaces on dedicated subnets within the same VNet | Different VNets aren't supported in this preview |
| Allows workloads to request interfaces through Kubernetes resources | Each secondary NIC can serve only one pod at a time |
| Supports specialized networking scenarios | Secondary NIC traffic bypasses AKS network policy enforcement |
Conclusion
Multiple network interfaces for pods in Azure Kubernetes Service provide additional networking flexibility for workloads that need separate communication paths. By combining secondary NICs on node pools, Kubernetes Dynamic Resource Allocation, and the managed DRAnet driver, AKS can allocate additional network interfaces to individual pods.
The configuration requires careful planning of VM sizes, virtual network subnets, resource claims, and security controls. Developers must also understand that secondary interface traffic has different network policy behavior from traffic using the primary interface.
Since the feature is currently in preview, validate its availability and limitations before adopting it for production workloads. For specialized networking scenarios, it provides an important capability for building more flexible Kubernetes architectures.
Join the conversation! Your thoughts help the community grow.