This repository provisions a basic Amazon EKS cluster and VPC for learning.
Resource names are automatically prefixed using your current AWS identity (derived from your IAM ARN), so different users can apply the same code without name collisions.
- VPC (CIDR
172.31.0.0/16) with public and private subnets - Single NAT gateway
- EKS cluster (
1.35) with public endpoint enabled - One managed node group (
t3.micro, desired size3) - Core EKS addons (
coredns,kube-proxy,vpc-cni,eks-pod-identity-agent)
- Terraform
>= 1.15.0(recommended) - AWS account and IAM permissions to create EKS, EC2, IAM, and VPC resources
- AWS credentials configured locally (for example via AWS CLI profile/env vars)
kubectlandhelm(for sample app deployment)
- Update Terraform backend in
backend.tf:
terraform {
backend "s3" {
bucket = "" # Update accordingly
key = "<name>.tfstate" # Update accordingly
region = "" # Update accordingly
}
}- If you want to deploy to a different AWS region, update
regioninprovider.tf.
The default region is ap-southeast-1 in provider.tf.
terraform init
terraform plan
terraform applyAfter apply, configure kubeconfig using the same region that is set in provider.tf (default ap-southeast-1):
aws eks update-kubeconfig \
--region ap-southeast-1 \
--name "$(terraform output -raw cluster_name)"Quick verification:
kubectl get nodes
kubectl get nsTwo sample Helm workloads are included under sample-apps/.
cd sample-apps/postgres
bash init.shNotes:
- Uses Bitnami PostgreSQL chart
16.7.21 - Deployed to namespace
postgres - Persistence is disabled in
values.yaml(data is not durable) - Credentials in
values.yamlare example/plaintext values; change them before any real usage
cd sample-apps/wordpress
bash init.shNotes:
- Uses Bitnami WordPress chart
25.0.5 - Deployed to namespace
wordpress - Persistence is disabled for both WordPress and MariaDB in
values.yaml
cluster_namecluster_endpoint(withouthttps://)
Show outputs:
terraform outputterraform destroyIf you deployed sample apps, uninstall them first to speed up cleanup:
helm uninstall postgres -n postgres
helm uninstall wordpress -n wordpressThis setup is intentionally minimal for learning and experimentation.
- It is not production hardened.
- Sample chart values include insecure defaults and no persistent storage.
- Review and secure IAM, networking, secrets, storage, and ingress settings before any real workload.