Create an Azure AKS Cluster

05 Jan 2024 in TIL

I needed to test Azure AKS with the Application Gateway Ingress Controller. Thankfully, Azure makes it easy with it's az aks CLI.

Create a new Azure resource group:

az group create --name mheap-test --location uksouth

Create a new AKS cluster with the Azure Application Gateway Ingress Controller enabled:

az aks create --name mheap-aks-test --resource-group mheap-test --node-count 1 --network-plugin azure --enable-managed-identity --enable-addons ingress-appgw --appgw-name mheap-appgw --appgw-subnet-cidr "" --generate-ssh-keys

Configure kubectl to connect to this cluster:

az aks get-credentials --resource-group mheap-test --name mheap-aks-test

Once you've finished testing, delete the AKS cluster and resource group:

az aks delete --name mheap-aks-test --resource-group mheap-test --yes
az group delete --name mheap-test --yes