利用xargs
:
kubectl get pods -A| grep -Ev 'redis|zookeeper|'|awk '{print $2}'|xargs -I{} kubectl get pod {} -o=jsonpath='{$.metadata.name} {$.spec.containers[0].image} {$.spec.containers[0].volumeMounts[*].mountPath}{"\n"}'
利用xargs
:
kubectl get pods -A| grep -Ev 'redis|zookeeper|'|awk '{print $2}'|xargs -I{} kubectl get pod {} -o=jsonpath='{$.metadata.name} {$.spec.containers[0].image} {$.spec.containers[0].volumeMounts[*].mountPath}{"\n"}'