Skip to content

Add support for AmazonLinux2027 - #8920

Draft
maitreya526 wants to merge 4 commits into
eksctl-io:mainfrom
maitreya526:feature/al2027-support
Draft

maitreya526 wants to merge 4 commits into
eksctl-io:mainfrom
maitreya526:feature/al2027-support

Conversation

@maitreya526

@maitreya526 maitreya526 commented Nov 12, 2026 •

Copy link
Copy Markdown

Description

Adds an AmazonLinux2027 AMI family for the AmazonLinux2027 EKS AMI preview.

AmazonLinux2027 nodes are named by EC2 instance ID by default (the nodeadm InstanceIdNodeName feature gate), but eksctl always gave self-managed Linux nodes an EC2_LINUX access entry, which expects private DNS names, so these nodes were rejected.

The new family reuses the AmazonLinux2023 nodeadm user data (the bootstrapper is renamed to Nodeadm in a separate commit), only supports containerd, and looks up AMIs from the public SSM parameters. The access entry type and aws-auth username now follow the InstanceIdNodeName feature gate in overrideBootstrapCommand: EC2 / system:node:{{SessionName}} for instance ID names, as described in the EKS docs, and EC2_LINUX / system:node:{{EC2PrivateDNSName}} otherwise. Managed nodegroups are supported, but EKS creates their access entry as EC2_LINUX, so eksctl rejects AmazonLinux2027 managed nodegroups that would use instance ID names. eksctl utils migrate-to-access-entry still skips system:node:{{SessionName}} mappings, as Fargate and hybrid node roles use the same username.

Go API change: the exported nodebootstrap.AL2023, NewAL2023Bootstrapper and NewManagedAL2023Bootstrapper are renamed to Nodeadm, NewNodeadmBootstrapper and NewManagedNodeadmBootstrapper. This only affects code that imports eksctl as a library.

ami: auto, GPU/Neuron (driver warnings, Inferentia/Trainium checks, NVIDIA device plugin) and Outposts don't support AmazonLinux2027 yet. arm64 isn't tested, as the preview only has an x86_64 AMI.

Testing

Unit tests cover the access entry type, aws-auth username, feature gate, validation, user data, SSM path and migrator.

Manual tests on a 1.37 cluster with the preview AMI ami-0ad72f625c44b33e3 (us-west-2):

Nodegroup Node name Access entry Result
Self-managed AmazonLinux2027 i-... EC2 Ready
Self-managed AmazonLinux2027, InstanceIdNodeName: false ip-... EC2_LINUX Ready
Managed AmazonLinux2027, InstanceIdNodeName: false ip-... EC2_LINUX, created by EKS Ready
Managed AmazonLinux2027, default Rejected by validation. Without this check, the node never joined.
Self-managed AmazonLinux2023, InstanceIdNodeName: true i-... EC2 Ready
Self-managed AmazonLinux2027 without ami ParameterNotFound, as expected (not published yet)

The aws-auth path is covered by unit tests. A system:node:{{SessionName}} aws-auth mapping was also tested by hand on the same cluster, and the node joined.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

AmazonLinux2027 nodes are named by EC2 instance ID, so the EC2_LINUX
access entry and the {{EC2PrivateDNSName}} aws-auth username eksctl
uses don't match and the nodes are rejected. Add an AmazonLinux2027
family for self-managed nodegroups that uses an EC2 access entry or a
{{SessionName}} aws-auth mapping, reuses the AmazonLinux2023 nodeadm
user data, and requires an AMI ID. Managed nodegroups are rejected
until EKS supports AmazonLinux2027.
@github-actions

Copy link
Copy Markdown
Contributor

Hello maitreya526 👋 Thank you for opening a Pull Request in eksctl project. The team will review the Pull Request and aim to respond within 1-10 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

Comment thread pkg/nodebootstrap/userdata.go Resolved
Comment thread pkg/nodebootstrap/al2027_test.go Resolved
@@ -43,8 +43,20 @@ const (
// RoleNodeGroupUsername is the default username for a nodegroup
// role mapping.
RoleNodeGroupUsername = "system:node:{{EC2PrivateDNSName}}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking: you may want to rename this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RoleNodeGroupUsername existed before this PR. It's exported and also used by the Karpenter and access entry migrator code. I'll rename it in a follow-up PR to keep this one focused.

normalizeAMIFamily(ng.BaseNodeGroup())
path := fmt.Sprintf("managedNodeGroups[%d]", index)

// EKS creates managed node access entries as EC2_LINUX, which doesn't match AmazonLinux2027 instance ID node names.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On behalf node-runtime/AL2027 project, I'm fine with not enforcing this validation. It will make things once we have the SSM params in 1-2 weeks. But of course, eksctl maintainers' preference takes precedence.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this, and since EKS creates the access entry for AL2027 managed nodegroups as EC2_LINUX, nodes with instance ID names never joined (details in the test results in the description). So instead of rejecting all AL2027 managed nodegroups, I've narrowed the check to only reject the ones that would use instance ID names. Nodegroups with InstanceIdNodeName: false are allowed. Happy to change this based on what the eksctl maintainers prefer.

Comment thread pkg/apis/eksctl.io/v1alpha5/types.go Resolved
return
}

if ng.AMIFamily == NodeImageFamilyAmazonLinux2023 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: If you are using IsNodeadmImage in places other than validation.go, then I don't think it belongs in validation.go. Is there a utilities/library file in this package? If not, defaults.go seems better.

@maitreya526 maitreya526 Nov 19, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept IsNodeadmImage in validation.go next to its sibling Is*Image helpers (IsAmazonLinuxImage, IsBottlerocketImage, IsWindowsImage, ...) for consistency. Some of those, like IsWindowsImage and IsBottlerocketImage, are already used outside validation.go too. Happy to move them together in a follow-up if you'd prefer.

}

// UsesInstanceIDNodeName reports whether nodes of the AMI family are named by EC2 instance ID.
func UsesInstanceIDNodeName(amiFamily string) bool {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: function seems redundant.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It now reads the InstanceIdNodeName feature gate from overrideBootstrapCommand, so the access entry, aws-auth username and managed nodegroup check all follow the same setting.

Pick the access entry type and aws-auth username from the nodeadm
InstanceIdNodeName feature gate, which defaults to on for
AmazonLinux2027.

Look up AmazonLinux2027 AMIs from SSM, like AmazonLinux2023.

Allow AmazonLinux2027 managed nodegroups, except with instance ID node
names, as EKS creates their access entry as EC2_LINUX.
AmazonLinux2023 and AmazonLinux2027 both use it, so name it after
nodeadm instead of AmazonLinux2023.
@maitreya526 maitreya526 changed the title Add support for AmazonLinux2027 custom AMIs Add support for AmazonLinux2027 Nov 19, 2026
Add a managedNodeGroups example with the InstanceIdNodeName feature
gate turned off, and list what isn't supported for AmazonLinux2027 yet.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants