Skip to content

[Bug] m8g instance types incorrectly default to AL2_x86_64 AMI instead of ARM64 #8448

@moko-poi

Description

@moko-poi

What were you trying to accomplish?

I was trying to create a nodegroup using m8g.large instances without explicitly specifying the --node-ami-family parameter, expecting eksctl to automatically detect that m8g instances are ARM64 architecture and select an appropriate ARM64 AMI family (similar to how it works for m7g and m6g instances).

What happened?

When creating a nodegroup with m8g instance types, eksctl incorrectly defaults to AL2_x86_64 AMI type instead of selecting an ARM64-compatible AMI. This causes the nodegroup creation to fail with an incompatibility error.

However, m7g and m6g instances work correctly and automatically select appropriate ARM64 AMIs when no --node-ami-family is specified.

Error message for m8g:

Resource handler returned message: "[m8g.large] is not a valid instance type for requested amiType AL2_x86_64" (Service: Eks, Status Code: 400, ...)

How to reproduce it?

Failing case (m8g instances):

eksctl create nodegroup \
  --cluster=my-cluster \
  --name=m8g-test \
  --instance-types=m8g.large \
  --region=us-west-2

Result: ❌ Fails with AL2_x86_64 incompatibility error

Working cases (m7g and m6g instances):

# m7g works correctly
eksctl create nodegroup \
  --cluster=my-cluster \
  --name=m7g-test \
  --instance-types=m7g.large \
  --region=us-west-2
# ✅ Automatically selects appropriate ARM64 AMI

# m6g works correctly
eksctl create nodegroup \
  --cluster=my-cluster \
  --name=m6g-test \
  --instance-types=m6g.large \
  --region=us-west-2
# ✅ Automatically selects appropriate ARM64 AMI

Workaround for m8g:

eksctl create nodegroup \
  --cluster=my-cluster \
  --name=m8g-test \
  --instance-types=m8g.large \
  --node-ami-family=AmazonLinux2023 \
  --region=us-west-2

Result: ✅ Works when explicitly specifying AMI family

Logs

Resource handler returned message: "[m8g.large] is not a valid instance type for requested amiType AL2_x86_64 (Service: Eks, Status Code: 400, Request ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)"

Anything else we need to know?

Analysis:

  • m8g instances are ARM64 Graviton4 processors and should be treated the same as m7g and m6g instances
  • The issue appears to be specific to m8g instance family - the AMI family detection logic doesn't seem to recognize m8g as ARM64 architecture
  • According to [PR #8001](Add support for M8g instance types #8001), m8g instance types should be supported
  • This suggests there might be a gap in the instance type mapping or AMI family detection logic specifically for the m8g instance family

Expected Behavior:
m8g instances should automatically select ARM64-compatible AMI families without requiring explicit --node-ami-family specification, consistent with m7g and m6g behavior.

Environment:

  • OS: Mac
  • Using downloaded binary
  • AWS credentials: default profile

Versions

$ eksctl info
eksctl version: 0.210.0
kubectl version:
- Client Version: v1.33.2
- Kustomize Version: v5.6.0
- Server Version: v1.33.1
OS: Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions