0 votes
in Kubernetes K8s by
How do I get all the pods on a node?

1 Answer

0 votes
by

You can use the following command to get all the pods on a node in kubernetes Cluster - 

$ kubectl get po --all-namespaces  -o jsonpath='{range .items[?(@.spec.nodeName =="nodename")]}{.metadata.name}{"\n"}{end}' 
...