The results of `aws eks list-nodegroups` and `eksctl get nodegroups` are inconsistent

9/25/2020


eksctl  get nodegroups --cluster=cluster-name --profile=dev
aws eks list-nodegroups --cluster=cluster-name --profile=dev

First result is correct \ Second result is air as follows:

{ 
    "nodegroups": [] 
} 

I used these two commands to get the nodegroup of the cluster, but found that the results were not consistent. \ The configuration file I used was the same ~/.aws/config. \ The cluster_name was checked by the command. Come out, these two commands can correctly detect cluster but cannot detect nodegroup \ Thanks in advance

-- gophergfer
amazon-eks
amazon-web-services
eksctl
kubernetes

1 Answer

9/25/2020

According to eksctl documentation:

Listing nodegroups

To list the details about a nodegroup or all of the nodegroups, use:

eksctl get nodegroup --cluster=<clusterName> [--name=<nodegroupName>]

Nodegroup immutability

By design, nodegroups are immutable. This means that if you need to change something (other than scaling) like the AMI or the instance type of a nodegroup, you would need to create a new nodegroup with the desired changes, move the load and delete the old one. Check Deleting and draining.

And for list-nodegroup from AWS documentation

Lists the Amazon EKS managed node groups associated with the specified cluster in your AWS account in the specified Region. Self-managed node groups are not listed.

As you can see there are differences in these commands such as Self-managed node groups are not listed in the second command.

-- Piotr Malec
Source: StackOverflow