'How to get k8s nodes without pods running on it?

Is it possible to get k8s nodes without pods running on it from kubectl? Here we have 3 k8s nodes: node1 node2 node3 And a pod runnnig on node1. Can i use kubectl to list node2 and node3?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source