Terraform code (module format) to set up AKS
What is AKS ?
Azure Kubernetes Service (AKS) manages your hosted Kubernetes environment, making it quick and easy to deploy and manage containerized applications without container orchestration expertise.
Why AKS ?
It eliminates the burden of ongoing operations and maintenance by provisioning, upgrading, and scaling resources on demand, without taking your applications offline.
How to Run the Terraform script ?
Pre-requisite
Setup the environment variable called TF_VAR_id and TF_VAR_secret with AZURE credentials
- go to dev folder and download all terraform plug-in.
$ terraform init
- Verify the resources that will be created and create a plan.
//$ terraform plan -out plan.out//
$ terraform plan -out plan.out -var id=$TF_VAR_id -var secret=$TF_VAR_secret
- apply the above created plan and setup the infrastructure for the AKS
$ terraform apply "plan.out"
- Run the script file to configure kubectl
$ terraform output kube_config > ~/.kube/config