Amazon EKS — Self-Managed Nodes

1 minute read

Self-Managed Nodes

Self-managed node groups give you full control over the EC2 instances, AMI, bootstrap script, and Auto Scaling Group. Use them when managed node groups don’t meet your requirements.


When to Use Self-Managed Nodes

Use Case Why
Custom AMIs Need pre-installed software or security hardening
Custom bootstrap Need specific kubelet flags or userdata
Windows nodes Some Windows configurations require self-managed
Spot with custom interruption handling Need custom draining logic

Create Self-Managed Node Group

nodeGroups:
  - name: custom
    instanceType: m5.large
    desiredCapacity: 3
    minSize: 1
    maxSize: 10
    privateNetworking: true
    volumeSize: 50
    ami: auto    # Or specify custom AMI ID
    labels:
      type: self-managed
    preBootstrapCommands:
      - "echo 'Starting bootstrap'"
      - "yum install -y custom-package"
    overrideBootstrapCommand: |
      #!/bin/bash
      /etc/eks/bootstrap.sh demo \
        --kubelet-extra-args '--node-labels=custom=true --max-pods=110'

Bootstrap Process

When a self-managed node starts, it runs the EKS bootstrap script:

Node Boot Sequence
1. EC2 instance launches with userdata
2. /etc/eks/bootstrap.sh runs
3. kubelet starts with cluster CA and API endpoint
4. Node registers with API server
5. VPC CNI starts, assigns pod IPs
6. Node status becomes "Ready"

Managed vs Self-Managed — Quick Comparison

Aspect Managed Self-Managed
AMI updates AWS handles You handle
Draining AWS handles You handle
Bootstrap Automatic You configure
Effort Low High

Common Mistakes

Mistake Fix
Wrong IAM role Node role needs AmazonEKSWorkerNodePolicy, AmazonEKS_CNI_Policy, AmazonEC2ContainerRegistryReadOnly
Incorrect bootstrap command Test bootstrap on a single node first
No node group label Hard to target with scheduling

What’s Next?

Learn about AMI options: AMI Types.