You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're trying to obtain a list of existing nodegroups as JSON or YAML, obtaining the nodegroup definition as list or an empty list like [] if none exists.
What happened?
Since 0.31.0 running eksctl get nodegroup --cluster my-cluster -o json without specifying nodegroup name (i.e. we want to list existing nodegroups) returns an error like:
# eksctl 0.31.0
$ eksctl get ng --cluster my-cluster -o json
Error: Nodegroup with name not found
However using 0.30.0 we get null output
# eksctl 0.30.0
$ eksctl get ng --cluster my-cluster -o json
null
Further back with 0.9.0 we got an empty list
# eksctl 0.9.0
$ eksctl get ng --cluster my-cluster -o json
[]
How to reproduce it?
Create or use an EKS cluster without any nodegroup and run these steps for related versions:
# 0.9.0
curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/0.9.0/eksctl_Linux_amd64.tar.gz" | tar xz -C /tmp
echo Testing version:
/tmp/eksctl version
/tmp/eksctl get ng --cluster my-cluster -o json
echo "\n$?"
echo
echo "---"
# 0.10.0
curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/0.10.0/eksctl_Linux_amd64.tar.gz" | tar xz -C /tmp
echo Testing version
/tmp/eksctl version
/tmp/eksctl get ng --cluster my-cluster -o json
echo "\n$?"
echo
echo "---"
# 0.30.0
curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/0.30.0/eksctl_Linux_amd64.tar.gz" | tar xz -C /tmp
echo Testing version:
/tmp/eksctl version
/tmp/eksctl get ng --cluster my-cluster -o json
echo "\n$?"
echo
echo "---"
# 0.31.0
curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/0.31.0/eksctl_Linux_amd64.tar.gz" | tar xz -C /tmp
echo Testing version:
/tmp/eksctl version
/tmp/eksctl get ng --cluster my-cluster -o json
echo $?
echo
echo "---"
Gives output like:
Testing version:
[ℹ] version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.9.0"}
[]
0
---
Testing version
[ℹ] version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.10.0"}
null
0
---
Testing version:
0.30.0
null
0
---
Testing version:
0.31.0
Error: Nodegroup with name not found
1
Anything else we need to know?
It would be nice to be able to list existing nodegroups and have an actual JSON or YAML empty list if no nodegroup exists. Currently behavior is not consistent and changes between versions, making it hard to automate eksctl in script or other systems.
The text was updated successfully, but these errors were encountered:
What were you trying to accomplish?
We're trying to obtain a list of existing nodegroups as JSON or YAML, obtaining the nodegroup definition as list or an empty list like
[]
if none exists.What happened?
Since
0.31.0
runningeksctl get nodegroup --cluster my-cluster -o json
without specifying nodegroup name (i.e. we want to list existing nodegroups) returns an error like:However using
0.30.0
we getnull
outputFurther back with
0.9.0
we got an empty listHow to reproduce it?
Create or use an EKS cluster without any nodegroup and run these steps for related versions:
Gives output like:
Anything else we need to know?
It would be nice to be able to list existing nodegroups and have an actual JSON or YAML empty list if no nodegroup exists. Currently behavior is not consistent and changes between versions, making it hard to automate
eksctl
in script or other systems.The text was updated successfully, but these errors were encountered: