The Azure Kubernetes Services provides two Network Plugin options. Kubenet, which was the first available option, and the Azure CNI (Advanced Networking).
The Azure CNI is the only networking option that supports provides support for capabilities like Vnet peering and network policies – basically most enterprise scenarios will require using the Azure CNI.
There’s a really comprehensive guide to the Azure CNI here : https://docs.microsoft.com/en-us/azure/aks/configure-azure-cnihttps://docs.microsoft.com/en-us/azure/aks/configure-azure-cni
This post is intended to serves as an example, and to emphasize several of the points in the official documentation.
Using an existing virtual network
I have a /23 vnet that offers 445 addresses. As each pod on each node will take an ip address from the virtual network, it’s pretty important to realise the limitations of using a small virtual network for your clusters. Where the virtual network is peered with other networks, including your on-prem network this can often mean you’ll end up needing a larger network address range than you first thought.
From the Azure CNI documentation, there’s a pretty handy formula you can plug into Excel to start seeing how many nodes/pods your address space will support.
=(A2+1) + ((A2+1) * B2)
sudo yum update
sudo yum install epel-release
sudo yum -y install python-pip
sudo pip install --upgrade pip
sudo pip install venv
pip install --upgrade --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge --no-cache-dir --user
az login --identity
Whenever I log into the VM I run this command to update to the latest build
sudo yum update
sudo pip install --upgrade --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge --no-cache-dir
I kinda like having a VM running all the time, i’m putting myself through a very basic IaaS experience using fundamental Azure components. I could make use of the Docker build of the AZ CLI and run it up on a Azure Container Instance on-demand…. Maybe next week, eh 🙂
Cloud Solution Architect at Microsoft in the UK.