Azure EKS using Terraform
This repository contains Infrastructure as Code (IaC) for setting up and managing Azure Kubernetes Service (AKS) using Terraform.
- To provide a scalable and maintainable AKS cluster setup.
- To automate the deployment and management of AKS resources.
- To ensure best practices and security standards are followed.
- Terraform installed on your local machine.
- Azure CLI installed and configured.
- An Azure subscription.
- Clone the repository.
- Navigate to the project directory.
- Initialize Terraform:
terraform init
- Plan the deployment:
terraform plan
- Apply the configuration:
terraform apply
The main configuration is defined in the main.tf
file. Below are some key configurations:
- Kubernetes Cluster:
- Name:
${var.prefix}-k8s
- Location:
var.location
- Resource Group:
var.resource_group_name
- Kubernetes Version:
var.kube_version
- Node Pool:
- Name:
default
- Node Count:
var.node_count
- VM Size:
var.node_size
- OS Disk Size:
var.disk_size
- Name:
- Role-Based Access Control: Enabled
- OIDC Issuer: Enabled
- Workload Identity: Enabled
- Identity Type:
SystemAssigned
- Network Plugin:
kubenet
- Load Balancer SKU:
standard
- Service Mesh: Istio
- Workload Autoscaler: Vertical Pod Autoscaler Enabled
- Name:
The variables used in the configuration are defined in the variables.tf
file. Some important variables include:
location
: Default iseastus
prefix
: Default ismlops-test
kube_version
: Default is1.31
node_count
: Default is2
node_size
: Default isStandard_D2s_v3
disk_size
: Default is30
istio_version
: Default isasm-1-23
tenant_id
,subscription_id
,resource_group_name
,client_id
,client_secret
: These should be set according to your Azure subscription details.tags
: Default tags include team, usage, and environment.