Skip to main content
EKS managed node groups are Auto Scaling Groups where AWS handles the node provisioning, updates, and termination lifecycle. You define the desired configuration and EKS coordinates rolling updates without requiring manual drain/cordon operations. Refer to the AWS EKS Managed Node Group documentation for service-level details.

Custom launch template

The module creates a custom launch template by default (use_custom_launch_template = true). This ensures settings such as tags, metadata options, and EBS configurations are propagated correctly to the underlying EC2 instances. Many advanced customization options are only available when using a custom launch template. To use the default template provided by the EKS service instead:
When use_custom_launch_template = false, the disk_size and remote_access fields become available but most other launch template customization options are unavailable. The disk_size variable is only valid when use_custom_launch_template = false — when using the custom launch template, configure disk size via block_device_mappings instead.

Supported AMI types

The ami_type variable controls which Amazon Machine Image variant nodes use. The default is AL2023_x86_64_STANDARD (starting from Kubernetes 1.30).

Basic configuration

The core sizing variables for a managed node group are:
desired_size is ignored after the initial creation to avoid conflicts with external autoscalers. See the eks-desired-size-hack for managing this in Terraform.

Examples

Node repair configuration

EKS managed node groups support automatic node repair. When enabled, EKS monitors node health and replaces nodes that become unhealthy. The module exposes the full node_repair_config object:

EFA support

Elastic Fabric Adapter (EFA) enables high-bandwidth, low-latency networking for tightly-coupled distributed workloads such as large-scale ML training. EFA must be enabled at both the cluster level and on each node group that should use it:
  1. The cluster-level enable_efa_support = true adds the required EFA ingress/egress rules to the shared node security group.
  2. The node group-level enable_efa_support = true does the following per node group:
    • Exposes all EFA interfaces supported by the selected instance type on the launch template
    • Creates a placement group with strategy = "clustered" per EFA requirements
    • Restricts subnets to only availability zones that support the selected instance type
Use the aws-efa-k8s-device-plugin Helm chart to expose EFA interfaces on nodes as extended resources and allow pods to request them. The EKS AL2 GPU AMI ships with the necessary EFA components pre-installed.
For managed node groups with multiple instance types, the first type in the instance_types list is used to calculate the number of EFA interfaces. Mixing instance types with different EFA interface counts is not recommended.

Key variables reference