Created
May 18, 2018 20:54
-
-
Save Aceeri/5bf6f3d21d357f9607199ac141ecc66e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pods='\n' read -r -a array <<< $(kubectl get pods -l app=$1 -o name | sed 's/pods\///g') | |
rm ~/kubefifo | |
mkfifo ~/kubefifo | |
for pod in "${array[@]}" | |
do | |
kubectl logs $pod -f > ~/kubefifo & echo "$pod following"; | |
done | |
cat ~/kubefifo | |
rm ~/kubefifo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment