Prerequisites
Before you start, make sure you have:- An AWS account with permissions to create IAM roles, EKS clusters, VPCs, and EC2 resources.
- Terraform
>= 1.5.7installed. - The AWS CLI installed and configured (
aws configureor environment variables set). - kubectl installed for verifying the cluster after creation.
Deploy the cluster
Create your Terraform configuration
Create a new directory and add a Replace
main.tf file with the following configuration. This uses the general-purpose built-in node pool, which is sufficient for most workloads.vpc_id and subnet_ids with the IDs of an existing VPC and private subnets in your AWS account. The subnets must be in at least two availability zones.Initialize Terraform
Download the module and provider plugins:You should see output confirming that the
terraform-aws-modules/eks/aws module and the AWS, TLS, and Time providers were installed.Review the execution plan
See exactly what Terraform will create before applying:The plan will include resources for the EKS cluster, IAM roles, KMS key, security groups, OIDC provider, and CloudWatch log group. EKS Auto Mode does not create EC2 nodes at this stage — nodes are provisioned automatically when you schedule workloads.
Apply the configuration
Create the cluster:Type
yes when prompted. Cluster creation typically takes 10–15 minutes. Terraform will print the cluster outputs when complete.Configure kubectl
Update your local kubeconfig so Replace
kubectl can connect to the new cluster:us-west-2 with the region you deployed to and example with the value you set for name in your module configuration.If you used terraform output to capture the cluster name, you can also run:Important caveats
The
enable_cluster_creator_admin_permissions = true setting adds your current IAM identity as a cluster administrator via an EKS access entry. This is different from the one-time bootstrap_cluster_creator_admin_permissions flag on the EKS API, which this module intentionally hardcodes to false. Using an access entry means you can revoke or modify access at any time without recreating the cluster.Clean up
To destroy all resources created by this configuration:Next steps
EKS managed node groups
Use EKS managed node groups for more control over instance types and node configuration.
Cluster access entries
Grant other IAM roles and users access to your cluster.
EKS add-ons
Install and manage EKS add-ons like CoreDNS, VPC CNI, and kube-proxy.
IRSA
Assign AWS IAM permissions to Kubernetes service accounts.
