0
0
Azurecloud~10 mins

AKS networking (kubenet, Azure CNI) - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - AKS networking (kubenet, Azure CNI)
Start AKS Cluster Setup
Choose Network Plugin
Kubenet
Pod IPs from
Node IP range
Pods use NAT
to access VNet
Limited Pod
IP scalability
Cluster Ready with chosen networking
The flow shows choosing between Kubenet and Azure CNI networking for AKS, detailing how pod IPs are assigned and network behavior.
Execution Sample
Azure
az aks create --name myAKS --resource-group myRG --network-plugin kubenet
az aks create --name myAKS --resource-group myRG --network-plugin azure
Creates AKS clusters with either Kubenet or Azure CNI networking plugin.
Process Table
StepActionNetwork PluginPod IP AssignmentNetwork BehaviorResult
1Start cluster creationN/AN/AN/APreparing resources
2Select network pluginkubenetPods get IPs from node subnet (private range)Pods use NAT to access VNetPods share node IP range
3Assign pod IPskubenetPod IPs assigned from node subnetPods cannot be reached directly from VNetLimited IP scalability
4Cluster readykubenetPods use node IP for outboundSimpler setup, less IP usageCluster operational
5Start cluster creationN/AN/AN/APreparing resources
6Select network pluginazurePods get IPs directly from Azure VNetPods have unique IPs in VNetPods fully integrated in VNet
7Assign pod IPsazurePod IPs assigned from VNet subnetPods reachable directly, no NATBetter network control
8Cluster readyazurePods have own IPsSupports advanced networkingCluster operational
💡 Cluster creation completes with chosen network plugin and pod IP assignment method.
Status Tracker
VariableStartAfter Kubenet SetupAfter Azure CNI SetupFinal
Network PluginNonekubenetazureSet per cluster
Pod IP SourceNoneNode subnetAzure VNet subnetAssigned per plugin
Pod IP ReachabilityNoneVia NAT through node IPDirect VNet IPDepends on plugin
IP ScalabilityNoneLimited by node subnetHigh, uses VNet IPsDepends on plugin
Key Moments - 3 Insights
Why do pods in Kubenet use NAT to access the VNet?
Because pods get IPs from a private range inside the node, they must use NAT through the node's IP to communicate outside. See execution_table rows 2 and 3.
How does Azure CNI allow pods to have their own IPs in the VNet?
Azure CNI assigns pod IPs directly from the Azure VNet subnet, making pods first-class network participants. See execution_table rows 6 and 7.
What limits the number of pods in Kubenet compared to Azure CNI?
Kubenet limits pods by the node subnet IP range, while Azure CNI uses VNet IPs allowing more pods. See variable_tracker row 'IP Scalability'.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table at step 3, where do pods get their IPs in Kubenet?
AFrom the node subnet (private range)
BFrom the Azure VNet subnet
CFrom a public IP pool
DFrom a separate Kubernetes subnet
💡 Hint
Check execution_table row 3 under 'Pod IP Assignment'
At which step does the cluster assign pods IPs directly from the Azure VNet?
AStep 2
BStep 4
CStep 7
DStep 3
💡 Hint
Look at execution_table row 7 under 'Pod IP Assignment'
If you want pods to be reachable directly in the VNet without NAT, which plugin should you choose?
Akubenet
Bazure
Cnone
Dboth
💡 Hint
See execution_table rows 6 and 7 under 'Network Behavior'
Concept Snapshot
AKS networking uses two main plugins:
- Kubenet: Pods get IPs from node subnet, use NAT for VNet access, simpler but limited IPs.
- Azure CNI: Pods get IPs directly from Azure VNet, no NAT, better integration and scalability.
Choose based on IP needs and network complexity.
Use az aks create --network-plugin to specify.
Full Transcript
This visual execution shows how AKS networking works with Kubenet and Azure CNI plugins. The flow starts with cluster setup, choosing the network plugin, then assigning pod IPs. Kubenet assigns pod IPs from the node subnet and uses NAT for VNet access, limiting pod IP scalability. Azure CNI assigns pod IPs directly from the Azure VNet subnet, allowing pods to have unique IPs reachable directly in the VNet. The execution table traces each step of cluster creation and pod IP assignment for both plugins. Variable tracking shows how key variables like network plugin choice and pod IP source change. Key moments clarify why NAT is used in Kubenet and how Azure CNI improves network integration. The quiz tests understanding of pod IP assignment and network behavior. The snapshot summarizes the key differences and usage of Kubenet and Azure CNI in AKS networking.