Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Graviton instances #231

Open
danrg opened this issue Dec 13, 2021 · 3 comments
Open

Add support for Graviton instances #231

danrg opened this issue Dec 13, 2021 · 3 comments

Comments

@danrg
Copy link

danrg commented Dec 13, 2021

Graviton instances are based on ARM 64 bit architecture and offer great price/performance ratios.
I tried adding a new node group (ng2) for Graviton instances:

  node_groups = {
    ng1 = {
      disk_size        = 20
      desired_capacity = 2
      max_capacity     = 4
      min_capacity     = 1
      instance_types   = ["t3.small"]
      capacity_type    = "SPOT"
      additional_tags  = var.tags
      k8s_labels       = {}
    }

    ng2 = {
      disk_size        = 20
      desired_capacity = 1
      max_capacity     = 4
      min_capacity     = 1
      instance_types   = ["t4g.small"]
      capacity_type    = "SPOT"
      additional_tags  = var.tags
      k8s_labels       = {}
    }

  }

Applying the Terraform code results in an error. The error message shows it tries to use x86 Amazon Linux 2 image, which is not valid, since it needs the ARM64 bit image:

│ Error: error creating EKS Node Group (staging:staging-ng2-enhanced-grubworm): InvalidParameterException: [t4g.small] is not a valid instance type for requested amiType AL2_x86_64
│ {
│ RespMetadata: {
│ StatusCode: 400,
│ RequestID: "73318df5-e6c3-4e1e-ad3b-7b209bc182f6"
│ },
│ ClusterName: "staging",
│ Message_: "[t4g.small] is not a valid instance type for requested amiType AL2_x86_64",
│ NodegroupName: "staging-ng2-enhanced-grubworm"
│ }

│ with module.eks.module.eks.module.node_groups.aws_eks_node_group.workers["ng2"],
│ on .terraform/modules/eks.eks/modules/node_groups/node_groups.tf line 1, in resource "aws_eks_node_group" "workers":
│ 1: resource "aws_eks_node_group" "workers" {

Thank you!

@seethatgo
Copy link
Collaborator

Adding some other info from @danrg
Example Graviton TF impl: https://github.com/niallthomson/eks-graviton-terraform

the critical bits are: ami_type = "AL2_ARM_64" so that it uses the ARM64 image, and instance_types from the separate nodegroup should be Graviton2 ones (such as m6g.medium)

Graviton1 is not supported (a1 instances), and Graviton3 is too new

@sekka1
Copy link
Collaborator

sekka1 commented Dec 23, 2021

@seethatgo @danrg is the blocker here not being able to set the base AMI for the EKS nodes?

@danrg
Copy link
Author

danrg commented Jan 4, 2022

@sekka1 Indeed, setting another AMI is the blocker here, as Graviton nodes need an ARM AMI.

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

No branches or pull requests

3 participants