Skip to content

ivanopassari/terraform-AWS-EKS-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform AWS VPC + EKS Cluster

This project provisions an Amazon VPC and an Amazon Elastic Kubernetes Service (EKS) cluster using official Terraform community modules.

📖 Notes

Ensure your AWS profile is configured with proper IAM permissions.

The VPC is tagged for Kubernetes LoadBalancer support.

By default, this setup creates 2 managed node groups across 2 private subnets.

Modify variables for scaling, spot instances, or HA requirements.


💰 Costs

  • EKS control plane: ~$0.10 USD/hour
  • Extra costs: EC2 worker nodes, NAT Gateways, and Load Balancers (ALB/NLB) are billed separately.
  • ⚠️ Note: NAT Gateways and Load Balancers can significantly increase monthly costs. Always clean up resources when not in use.

📦 Requirements

  • Terraform >= 0.12
  • AWS CLI with a configured profile
  • An AWS account with sufficient permissions
  • kubectl to interact with the EKS cluster

⚙️ Modules Used


📂 Project Structure

  • VPC module: Creates VPC, subnets (public + private), NAT gateways, and tags for Kubernetes.
  • EKS module: Creates EKS cluster, managed node groups, and applies networking/security settings.
  • Security Groups: Allows worker node management (SSH access limited to private CIDRs).
  • Kubernetes Provider: Automatically configures kubeconfig for access.

🚀 Usage

  1. Clone the repository (or copy files locally).

  2. Initialize Terraform (downloads providers and modules):

    terraform init
    
  3. Terraform Plan

       terraform plan -var="region=eu-central-1" -var="cluster_name=my-eks" -var="instance_class=t3.medium"
    
  4. Create

       terraform apply -auto-approve -var="region=eu-central-1" -var="cluster_name=my-eks" -var="instance_class=t3.medium"
    
    
  5. 🧹 Cleanup To destroy all resources (to avoid costs):

       terraform destroy -auto-approve

About

This project provisions an Amazon VPC and an Amazon Elastic Kubernetes Service (EKS) cluster using official Terraform community modules.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages