0

Total noob and have a runaway EKS cluster adding up $$ on AWS.

I'm having a tough time scaling down my cluster ad not sure what to do. I'm following the recommendations here: How to stop AWS EKS Worker Instances reference below

If I run: "eksctl get cluster", I get the following:

NAME REGION EKSCTL CREATED my-cluster us-west-2 True unique-outfit-1636757727 us-west-2 True

I then try the next line "eksctl get nodegroup --cluster my-cluster" and get:

2021-11-15 15:31:14 [ℹ] eksctl version 0.73.0 2021-11-15 15:31:14 [ℹ] using region us-west-2 Error: No nodegroups found

I'm desperate to try and scale down the cluster, but stuck in the above command. Seems everything installed and is running as intended, but the management part is failing! Thanks in advance! What am I doing wrong?

Reference --

eksctl get cluster

eksctl get nodegroup --cluster CLUSTERNAME

eksctl scale nodegroup --cluster CLUSTERNAME --name NODEGROUPNAME --nodes NEWSIZE

To completely scale down the nodes to zero use this (max=0 threw errors):

eksctl scale nodegroup --cluster CLUSTERNAME --name NODEGROUPNAME --nodes 0 --nodes-max 1 --nodes-min 0

EKSNoob
  • 1
  • 1
  • Can you paste the complete output of the command `eksctl scale -v 5 --name --cluster --region --nodes 0` – gohm'c Nov 16 '21 at 00:33
  • I get the following: zsh: no such file or directory: group Should there be something custom within the <> or is the command going to collect? – EKSNoob Nov 16 '21 at 01:19
  • You need to substitute <> with the actual name. – gohm'c Nov 16 '21 at 01:23
  • That's what I thought, but when I run eksctl get clustter I get >(NAME REGION EKSCTL CREATED) >(my-cluster us-west-2 True) >(unique-outfit-1636757727 us-west-2 True) When I try to run >(eksctl get nodegroup --cluster my-cluster) >I get: >(2021-11-15 19:18:39 [ℹ] eksctl version 0.73.0) >(2021-11-15 19:18:39 [ℹ] using region us-west-2) >(Error: No nodegroups found) That's what I need to locate to manage the cluster. Not sure what I'm doing wrong?! Sorry, I can't seem to get the formatting right on here either. Every > is a new line. Thanks, – EKSNoob Nov 16 '21 at 02:23
  • You cluster does not use managed node group. See the answer section for more information. – gohm'c Nov 16 '21 at 02:33

1 Answers1

0

You don't have managed node group therefore eksctl does not return any node group result. The same applies to aws eks cli.

...scaling down my cluster...

You can logon to the console, goto EC2->Auto Scaling Groups, locate the launch template and scale by updating the "Group details". Depends on how your cluster was created, you can look for the launch template tag kubernetes.io/cluster/<your cluster name> to find the correct template.

gohm'c
  • 13,492
  • 1
  • 9
  • 16
  • So, the template looks like it's going to create compute? I'm a bit confused as to how that scales down when I don't appear to have anything there. Also kubernetes.io/cluster/my-cluster didn't present anything. I'm guessing that's not the right cluster name? Where would I find it otherwise? Sorry, I was following the EKS guide and somehow didn't end up there, as it appears, so a bit lost as to how I even got here under EC2 and if I'm just going to add costs by creating additional templates (compute) as it appears to be creating. Thanks, – EKSNoob Nov 16 '21 at 04:45