JHow
JHow

Reputation: 25

AWS EKS nodegroup creation throws no error when created, but gets excluded and doesn't join the cluster

I am trying to create a new nodegroup on an AWS EKS cluster using the following yaml configuration:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: kf
  region: us-east-1

vpc:
  id: <VPC_ID>
  securityGroup: <SG_ID>
  subnets:
    private:
      private1:
        id: <SUBNET1>
      private2:
        id: <SUBNET2>
      private3:
        id: <SUBNET3>

managedNodeGroups:
  - name: managed-ng-gpu-g4dn
    amiFamily: AmazonLinux2
    ami: ami-072885db87a9a23d7
    overrideBootstrapCommand: |
      #!/bin/bash
      /etc/eks/bootstrap.sh kf
    instanceType: g4dn.xlarge
    labels: { role: workers }
    minSize: 0
    maxSize: 4
    volumeSize: 45
    privateNetworking: true

When I went to create the nodegroup, it never joined the cluster. No errors are thrown, but the nodegroup is excluded and never created. I am not using the include or exclude arguments in the cli command, just eksctl create nodegroup --config-file create_nodegroup.yaml

2024-05-18 08:25:36 [ℹ]  will use version 1.25 for new nodegroup(s) based on control plane version
2024-05-18 08:25:37 [!]  no eksctl-managed CloudFormation stacks found for "kf", will attempt to create nodegroup(s) on non eksctl-managed cluster
2024-05-18 08:25:39 [ℹ]  nodegroup "managed-ng-gpu-g4dn" will use "ami-072885db87a9a23d7" [AmazonLinux2/1.25]
2024-05-18 08:25:40 [ℹ]  3 existing nodegroup(s) (managed-ng-gpu-g4dn,managed-ng-gpu-p2-xlarge,managed-ondemand-cpu-20240503123911636500000009) will be excluded
2024-05-18 08:25:40 [ℹ]  1 task: { no tasks }
2024-05-18 08:25:40 [ℹ]  no tasks
2024-05-18 08:25:40 [✔]  created 0 nodegroup(s) in cluster "kf"
2024-05-18 08:25:40 [✔]  created 0 managed nodegroup(s) in cluster "kf"
2024-05-18 08:25:40 [ℹ]  checking security group configuration for all nodegroups
2024-05-18 08:25:40 [ℹ]  all nodegroups have up-to-date cloudformation templates

Upvotes: 1

Views: 87

Answers (1)

gohm&#39;c
gohm&#39;c

Reputation: 15480

...the nodegroup is excluded and never created.

Try delete your cluster and re-create with:

...
overrideBootstrapCommand: |
  #!/bin/bash
  /etc/eks/bootstrap.sh kf --kubelet-extra-args '--node-labels=eks.amazonaws.com/nodegroup=managed-ng-gpu-g4dn,eks.amazonaws.com/nodegroup-image=ami-072885db87a9a23d7'

Upvotes: 0

Related Questions