https://github.com/ialejandro/terraform-aks
Deploy AKS with Terraform
https://github.com/ialejandro/terraform-aks
aks azure kubernetes terraform
Last synced: about 1 month ago
JSON representation
Deploy AKS with Terraform
- Host: GitHub
- URL: https://github.com/ialejandro/terraform-aks
- Owner: ialejandro
- License: mit
- Archived: true
- Created: 2021-06-22T19:43:52.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-07T08:37:37.000Z (over 1 year ago)
- Last Synced: 2025-03-10T01:24:45.671Z (3 months ago)
- Topics: aks, azure, kubernetes, terraform
- Language: HCL
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform AKS deploy
## Documentation
* [Azure provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs)
* [AKS module](https://registry.terraform.io/modules/Azure/aks/azurerm/latest)
* [Network module](https://registry.terraform.io/modules/Azure/network/azurerm/latest)
* [AKS Release version](https://docs.microsoft.com/en-US/azure/aks/supported-kubernetes-versions#azure-portal-and-cli-versions)## Requirements
* Terraform: `>= v0.15.0`
* Configure Azure subscription
* The VPC must be exists
* The subnets must be exists
* Require `azure-cli` ([how-to-install](https://docs.microsoft.com/en-US/cli/azure/install-azure-cli))## First steps!
1. Create Storage to save `.tfstate`
2. Modify `config.tf` with properly `subscription_id`, `storage_account_name` and `resource_group_name`
3. Modify `aks.auto.tfvars` with your values
4. Install all dependencies and providers: `terraform init`
5. Deploy: `terraform apply`## Files
* `config.tf`: providers, requirements and backend for Terraform
* `aks.auto.tfvars`: values for deployment
* `main.tf`: main file with AKS resource
* `outputs.tf`: output resources
* `variables.tf`: declare all variables with default values## Default values
```bash
# AKS
## GENERAL
aks_rg_name = "my-resource-group"
aks_cluster_name = "cluster"
aks_version = "1.19.7"
aks_nr_workers = 3## WORKERS
aks_worker_volume_size = 100
```## Tests
* (Average) Complete deployment: ~10 minutes