I am trying to get nodegroups assigned to each of the nodes in EKS, but not able to find any command with eksctl or kubectl to get that done. I have tried: eksctl list-nodegroups, describe-nodegroups but none of them give me the nodes along with nodegroups. Nowhere in doc I find how we can do that. Is thr any way we can get this?
Asked
Active
Viewed 27 times
-1
-
Possible duplicate of https://stackoverflow.com/questions/69982072/unable-to-get-nodegroup-info-using-eskctl?rq=2 – rkochar Aug 10 '23 at 09:05
-
No..i just want to list my nodes with nodegroups..either with eksctl or kubectl using some jq or any other method.. – Stack_IQ Aug 10 '23 at 09:54
1 Answers
1
... want to list my nodes with nodegroups..either with eksctl or kubectl using some jq
This command will provide you the list of nodes and node group.
kubectl get nodes -o json | jq -r '.items[] | [.metadata.name, .metadata.labels."eks.amazonaws.com/nodegroup"] | @tsv' | column -t -s $'\t'

gohm'c
- 13,492
- 1
- 9
- 16