This directory holds Terraform configuration files for deploying an AKS cluster with ARM64 node pools. It is an alternative to deploying with Azure Bicep
- An Azure Subscription (e.g. Free or Student account)
- The Azure CLI
- Bash shell (e.g. macOS, Linux, Windows Subsystem for Linux (WSL), Multipass, Azure Cloud Shell, GitHub Codespaces, etc)
- The Terraform CLI
Terraform will use your Azure CLI login context to deploy the resources into your subscription. Login to the Azure CLI and ensure you have selected the proper subscription.
az login
Optionally set the correct subscription if you have more than one.
az account set -s '<YOUR_SUBSCRIPTION_NAME>'
Change to the cloud-native/containerapps-terraform/terraform
subdirectory of this repo and run the Terraform deployment script.
cd cloud-native/aks-arm64-terraform
terraform init
terraform apply
Terraform state files will be stored locally within your current directory; however, best practice is to store your Terraform state files in Azure Storage or Terraform Cloud.
Once you've completed the deployment of Azure infrastructure, run the following command to set the random deployment name to an environment variable.
export name=$(terraform output -raw random_pet_name)
You can pull down the kube_config
file with the following command.
az aks get-credentials --resource-group "rg-${name}" --name "aks-${name}"
Validate access to your AKS cluster using kubectl
.
kubectl get nodes -o wide
Continue on to the Deploying ARM64
workloads to Kubernetes portion of the Azure Kubernetes Service with ARM64 node pools lab to deploy workloads to your cluster.
Once you have finished exploring AKS with ARM64 node pools, you should delete the deployment to avoid any further charges.
Run the destroy
command to delete all your resources.
terraform destroy