list all pods that mange by service called baz and write result pod names to specified file. code example
Example 1: kubectl get pod by node
kubectl get pods --all-namespaces -o wide --field-selector spec.nodeName=
Example 2: kubectl describe to yaml
kubectl describe -o yaml