Installing Agones on Azure Kubernetes Service using Terraform

You can use Terraform to provision an AKS cluster and install Agones on it.

Installation

Install az utility by following these instructions.

The example of AKS submodule configuration could be found here: Terraform configuration with Agones submodule

Copy module.tf file into a separate folder.

Login to Azure CLI:

az login

Configure your terraform:

terraform init

Now you can deploy your cluster (use variables from the above az ad sp create-for-rbac command output):

terraform apply -var client_id="<appId>" -var client_secret="<password>"

Once you created all resources on AKS you can get the credentials so that you can use kubectl to configure your cluster:

az aks get-credentials --resource-group agonesRG --name test-cluster

Check that you have access to the Kubernetes cluster:

kubectl get nodes

Uninstall the Agones and delete AKS cluster

Run next command to delete all Terraform provisioned resources:

terraform destroy

Reference

Details on how you can authenticate your AKS terraform provider using official instructions

Next Steps


Last modified March 28, 2020: update local.md (#1437) (6ff2787)