kubectl apply with cat input code example
Example 1: kubectl list context
# list kubernets contexts
kubectl config get-contexts
Example 2: kubectl get pod by node
kubectl get pods --all-namespaces -o wide --field-selector spec.nodeName=<node>
# list kubernets contexts
kubectl config get-contexts
kubectl get pods --all-namespaces -o wide --field-selector spec.nodeName=<node>