This Terraform project sets up a development-ready AWS EKS cluster. It's designed to be a cost-effective and best-practice foundation for your containerized applications.
- VPC: Creates a new VPC with public and private subnets across two availability zones.
- EKS Cluster: A robust EKS cluster with the necessary IAM roles.
- Node Group: A managed node group using
t3.micro
instances, suitable for development and testing. - IAM Roles: Proper IAM roles for the EKS cluster and worker nodes.
- Outputs: Key information like the cluster endpoint and kubeconfig command are provided as outputs.
-
Clone the repository:
git clone <your-repo-url> cd <repo-name>
-
Initialize Terraform:
terraform init
-
Review the plan:
terraform plan
-
Apply the configuration:
terraform apply
-
Configure kubectl: After the apply is complete, Terraform will output a command to configure
kubectl
. Run that command to connect to your new EKS cluster.aws eks update-kubeconfig --region $(terraform output -raw region) --name $(terraform output -raw cluster_name)
-
Destroy the infrastructure: When you no longer need the resources, you can destroy them to avoid ongoing charges.
terraform destroy