This repository showcases using Terraform to provision a new network and AKS cluster with nodes within.
Ensure that kubectl
, az
, and terraform
are installed first.
Initialise the Azure CLI if you haven't already:
az login
Fill out terraform.tfvars
with the variables you'd like.
Required variables are location
, and name
, the Azure location/region, and name you'd like your cluster.
For reference, running az account list-locations -o table
will get a list of regions to use.
Availability zones can be configured for high availability if the chosen region supports it. An example terraform.tfvars
:
name = "mycluster"
location = "westus2"
availability_zones = ["1", "2", "3"]
node_count = 3
min_count = 3
max_count = 6
terraform init
terraform apply
az aks get-credentials --resource-group mycluster --name mycluster
kubectl get nodes -o wide
terraform destroy
- AKS documentation for more information on AKS itself.
- Terraform AKS documentation for more details on customising the cluster.