kubectl command to get logs based on condition 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=