Prerequisites
- AWS credentials with permissions to create EKS, EC2 (including Auto Scaling), IAM, and VPC resources
- Terraform >= 1.5.7
- AWS provider >= 6.28
- The example provisions its own VPC — no pre-existing VPC is required
Self-managed node groups require the module to create an access entry on behalf of the node IAM role so that nodes can join the cluster. This is handled automatically by the module — no
aws-auth ConfigMap changes are needed.VPC and shared locals
Both clusters share a common VPC defined inmain.tf.
Amazon Linux 2023 cluster (eks-al2023.tf)
Bottlerocket cluster (eks-bottlerocket.tf)
Self-managed vs. EKS managed: key differences
instance_type vs. instance_types
Self-managed node groups use a single instance_type string, whereas EKS managed node groups accept a list (instance_types). This is an important distinction when copying configuration between the two.
Node upgrades
For self-managed node groups, node upgrades require you to:- Update the
kubernetes_version(orami_release_version) in Terraform - Apply the change to update the launch template
- Manually drain and terminate old nodes (or use an instance refresh policy)
Deploy
1
Initialize Terraform
2
Review the plan
3
Apply
4
Configure kubectl
Key outputs
Full example on GitHub
View the complete example includingoutputs.tf, variables.tf, and versions.tf.