Lab 1: EKS Cluster Provisioning
Deploy EKS with Terraform
Private endpoint, encrypted secrets, managed nodes in private subnets.
EKS module
$ cat > eks.tf << 'EOF' module "eks" { source = "terraform-aws-modules/eks/aws" version = "~> 20.0" cluster_name = "bootcamp-eks" cluster_version = "1.29" cluster_endpoint_public_access = false cluster_endpoint_private_access = true cluster_encryption_config = { provider_key_arn = aws_kms_key.eks.arn resources = ["secrets"] } vpc_id = module.vpc.vpc_id subnet_ids = module.vpc.private_subnets eks_managed_node_groups = { secure = { min_size = 2 max_size = 4 desired_size = 2 instance_types = ["t3.medium"] } } } EOF $ terraform plan $ terraform apply
WHY THIS MATTERS
EKS costs ~$0.10/hr for the control plane plus node costs. Budget ~$150/month for a 2-node lab cluster. Destroy when not actively labbing.