Description
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!