Skip to main content
Self-managed node groups give you complete control over the underlying EC2 Auto Scaling groups. Unlike EKS managed node groups, AWS does not manage the node lifecycle — you are responsible for draining and terminating nodes during upgrades. In return you gain access to configuration options that are not available with managed node groups, such as mixed instance policies, custom launch templates, and full userdata control. This example demonstrates two clusters: one with Amazon Linux 2023 (AL2023) nodes and one with Bottlerocket nodes, both running as self-managed node groups.

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 in main.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:
  1. Update the kubernetes_version (or ami_release_version) in Terraform
  2. Apply the change to update the launch template
  3. Manually drain and terminate old nodes (or use an instance refresh policy)
Self-managed node group upgrades are not automated. Failing to drain nodes before termination can cause workload disruption.

Deploy

1

Initialize Terraform

2

Review the plan

3

Apply

4

Configure kubectl

Key outputs

Full example on GitHub

View the complete example including outputs.tf, variables.tf, and versions.tf.