awslabs / eks-node-viewer

EKS Node Viewer
Apache License 2.0
1.15k stars 91 forks source link

Viewer only showing one node #297

Closed smasset-orange closed 1 month ago

smasset-orange commented 2 months ago

Thanks for the great tool.

I've noticed a weird bug when using it with unmanaged K8S clusters (obviously with pricing disabled as these actually run outside of AWS) and it seems it might be related to the fact the cluster has control plane nodes or not.

Here's a screenshot when running eks-node-viewer -disable-pricing on a vanilla K8S cluster with only 3 control plane nodes : image

The node beeing displayed actually rotates between the 3 control plane nodes when the view is automatically refreshed.

Here's another screenshot running the same command on a non EKS managed cluster (without control plane nodes) : image

I've also tried to run it against a cluster with both control plane and compute nodes with a node selector filtering out the control plane which also resulted in the viewer only displaying one node at a time.

I've tested it against the v0.5.0 and v0.6.0 released versions and both showed the same results.

I know this is probably a corner case but do you think you can still look into it ?

Thanks for your help.

tzneal commented 1 month ago

The nodes are probably missing a providerID, which we expect to exist.

smasset-orange commented 1 month ago

(sorry for the delay, I just got back from vacation).

That was it ! I've assigned a different .spec.providerID for each node and now get the expected output. Thanks.