Skip to main content
EKS Hybrid Nodes lets you attach Linux machines running outside of AWS — such as on-premises bare-metal servers or VMs in another cloud — to an EKS cluster. The remote nodes register via either AWS Systems Manager (SSM) or IAM Roles Anywhere. AWS manages the Kubernetes control plane while you retain ownership of the physical or virtual infrastructure. This example deploys an EKS cluster configured to accept hybrid nodes. It uses the modules/hybrid-node-role sub-module to create the IAM role that remote nodes assume when they join the cluster, and configures remote_network_config to tell EKS the CIDR ranges used by the remote nodes and pods.

Prerequisites

  • AWS credentials with permissions to create EKS, IAM, VPC, and SSM resources
  • Terraform >= 1.5.7
  • AWS provider >= 6.28
  • Helm provider (example installs Cilium CNI on hybrid nodes)
  • Remote nodes running a supported Linux distribution with nodeadm installed
  • Network connectivity (VPN, Direct Connect, or VPC peering) between your cluster VPC and the remote node network
AWS EC2 instances are not supported as EKS Hybrid nodes. The example uses EC2 only to simulate a remote environment for demonstration purposes. In production, hybrid nodes must be on-premises or in another cloud provider.

Example code

EKS cluster (main.tf)

The following is the complete main.tf from examples/eks-hybrid-nodes.

Hybrid node role and remote resources (remote.tf)

The modules/hybrid-node-role sub-module creates the IAM role that remote nodes assume during registration. The example also creates SSM activation resources and (for demonstration only) EC2 instances that simulate remote nodes.

Key concepts

remote_network_config

This block tells EKS the IP ranges used by remote nodes and pods. EKS uses this information to route traffic correctly between the control plane, cloud nodes, and hybrid nodes.
Only RFC 1918 address space is supported (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).

HYBRID_LINUX access entry

Hybrid nodes use a special access entry type of HYBRID_LINUX instead of the default STANDARD. This grants the hybrid node IAM role the permissions needed to join and operate within the cluster:

create_node_security_group = false

Hybrid nodes cannot use the module-managed node security group because they are not EC2 instances in your VPC. Setting create_node_security_group = false and adding an ingress rule for the remote network CIDR on the cluster security group allows bidirectional traffic.

EKS Auto Mode system node pool

The example enables EKS Auto Mode with the system node pool to run system components (CoreDNS, etc.) on cloud nodes, while hybrid nodes handle application workloads.

Joining a node with nodeadm

Once the SSM activation is created, nodes join the cluster by running nodeadm with a configuration file:

Deploy

1

Initialize Terraform

2

Review the plan

3

Apply

4

Configure kubectl

5

Join remote nodes

Copy the generated join.sh script to each remote node and execute it, or manually run nodeadm init with the SSM activation credentials from the Terraform output.
6

Verify hybrid nodes are ready

Hybrid nodes appear with the label eks.amazonaws.com/compute-type=hybrid.

Key outputs

Full example on GitHub

View the complete example including the AMI build scripts in the ami/ directory, VPC peering setup, and the full remote.tf with simulated hybrid nodes.