I’ve been exploring the Kubernetes documentation and it appears that selecting pods based on labels is feasible. However, I aim to retrieve all pods located on a specific node without adding labels to each pod. Is there something in the documentation that I might be overlooking, or is it impossible to filter by node? For instance, using this command:
kubectl get pods \
--output=wide \
--namespace=$NS \
--server=$SERVER | head
Can any of the resulting columns serve as selectors? If so, what’s the method for accomplishing this with kubectl
and through the API?