Fix Azure AKS Network Plugin Errors
When working with Azure AKS, you may encounter a configuration error that prevents your deployment from working. This guide explains the most common mistake with network plugin and shows the exact fix.
A Common Mistake
Choosing the wrong network plugin (kubenet vs Azure CNI) when creating an AKS cluster, as it cannot be changed after creation.
The incorrect command:
az aks create --name my-aks --resource-group my-rg --node-count 3 --network-plugin kubenet
Error output:
Cluster created with kubenet.
Limitations:
- Nodes get IPs from the VNet subnet, pods get IPs from a different CIDR
- Cannot use Network Policies (Azure or Calico)
- Max 250 pods/node (with kubenet)
- Pod-to-pod traffic is NATed
- Cannot integrate with Azure networking features
The Correct Approach
The right way to configure network plugin in Azure AKS:
az aks create --name my-aks --resource-group my-rg --node-count 3 --network-plugin azure --network-plugin-mode overlay --pod-cidr 10.244.0.0/16
Successful result:
Cluster created with Azure CNI.
Benefits:
- Pods get IPs from the VNet subnet (or overlay CIDR)
- No NAT between pods
- Supports Network Policies (Azure or Calico)
- Max 250 pods/node (with overlay mode)
- Integrates with Network Watcher, VNet flow logs
How to Prevent This
Choose network plugin at cluster creation. Azure CNI is recommended (required for network policies, VNet integration). Kubenet is suitable for small dev clusters. Azure CNI Overlay mode (preview) avoids IP exhaustion. Azure CNI uses more IP addresses per node (one per pod). Cannot change after creation.
FAQ
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. Secure your cloud with DodaTech.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro