How it works
Theself-managed-node-group submodule creates:
- An EC2 launch template
- An Auto Scaling Group (ASG) using that launch template
- An IAM instance profile and role for the nodes
- An EKS access entry so nodes can join the cluster
- A security group for the node group
Basic configuration
Examples
- AL2023
- Bottlerocket
Auto Scaling Group configuration
The module creates an Auto Scaling Group with a rolling instance refresh strategy by default:Mixed instances policy
For cost optimization using a blend of On-Demand and Spot instances, enableuse_mixed_instances_policy:
Launch template options
The module creates a launch template for each self-managed node group. All standard EC2 launch template options are exposed as variables:Bootstrap user data
For AL2023 nodes, user data is configured using cloud-init multi-part documents withnodeadm:
IAM and access entry
The module creates an IAM instance profile, an IAM role with the required EKS node policies, and an EKS access entry (create_access_entry = true by default). The access entry allows the node role to join the cluster without configuring the aws-auth ConfigMap.
To use an existing IAM role:
Key variables reference
| Variable | Default | Description |
|---|---|---|
instance_type | m6i.large | EC2 instance type |
ami_type | AL2023_x86_64_STANDARD | AMI family (determines bootstrap behavior) |
ami_id | "" | Custom AMI ID; leave empty to use the latest EKS-optimized AMI |
min_size | 1 | ASG minimum capacity |
max_size | 3 | ASG maximum capacity |
desired_size | 1 | ASG initial desired capacity |
use_mixed_instances_policy | false | Enable mixed On-Demand and Spot instances |
create_access_entry | true | Create EKS access entry for the node role |
enable_efa_support | false | Enable EFA networking interfaces |
