I have a couple separate instance groups, and kubectl top nodes
will display the CPU and Memory usage of all nodes. I'd like to be able to just ask for the information for a specific instance group if possible.
1 Answer
Do your instance groups have labels identifying the groups they belong to? If so, you can filter to them using the -l
/--selector
option, like so:
kubectl top nodes --selector instance-group=group-1
This assumes that the label name is instance-group
and the label value for the group you want to query is group-1
.