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}' 

Related questions

0 votes
asked Sep 29, 2022 in Kubernetes K8s by SakshiSharma
0 votes
asked Sep 27, 2022 in Kubernetes K8s by SakshiSharma
...