Setting up an AKS cluster with Terraform is not trivial. The project project seeks to fulfill the following goals:
- A minimal configuration that configures an Ingress, certificate management and Helm.
- A scalable and 'reliable' cluster.
- The same project can be used to configure many environments (dev, test, prod etc.)
- The project can be used by others directly and indirectly
You will need the following installed:
- helm
- kubectl
- terraform
OS X & Linux:
If you don't have a Azure blob container installed yet, you can create one as follows:
cd terraform-state
export TF_VAR_terraform_storage_name=<This must be a unique name>
terraform init
terraform plan
terraform plan -out planfile
If TF_VAR_terraform_storage_name is not yet specified, set it.
export TF_VAR_terraform_storage_name=<This must be a unique name>
Make sure you are in the root directory of the project and initialize the state file so it is stored on the storage_account_name
and in container name container_name
.
terraform init -backend-config="storage_account_name=$TF_VAR_terraform_storage_name" \
-backend-config="container_name=terraform-state" \
-backend-config="key=dev.terraform.tfstate"
terraform plan
terraform apply
- 0.0.1
- Work in progress. There is still an issue with certificate enrollment.
Your Name – @rjdkolb
Distributed under the MIT license. See LICENSE
for more information.
https://github.com/rjdkolb/opinionated-aks-bootstrap
- Fork it (https://github.com/rjdkolb/opinionated-aks-bootstrap/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request