#! /bin/bash for p in $(oc get pods --all-namespaces --no-headers | awk '{print $2":"$1}'); do pod=${p%:*}; ns=${p#*:}; echo "=== $ns/$pod ===" oc -n "$ns" get pod "$pod" -o json | grep gluster done