Skip to content

Instantly share code, notes, and snippets.

@gerred
Forked from Martlark/log_deployment.sh
Created January 25, 2018 19:47
Show Gist options
  • Save gerred/4406f43c9e6e7f07229d6b3b304e84a5 to your computer and use it in GitHub Desktop.
Save gerred/4406f43c9e6e7f07229d6b3b304e84a5 to your computer and use it in GitHub Desktop.
Simple script to get logs from the pods of a deployment
#!/usr/bin/env bash
for p in $(kubectl get pods --all-namespaces | cut -f 1 -d ' '); do
echo ---------------------------
echo $p
echo ---------------------------
kubectl logs $p
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment