Skip to content

Instantly share code, notes, and snippets.

@krishnachaitanyareddy
Forked from Martlark/log_deployment.sh
Created June 22, 2017 07:18
Show Gist options
  • Save krishnachaitanyareddy/321a9cb8de32dc1635b855cf075f0b49 to your computer and use it in GitHub Desktop.
Save krishnachaitanyareddy/321a9cb8de32dc1635b855cf075f0b49 to your computer and use it in GitHub Desktop.
Simple script to get logs from the pods of a deployment
#!/usr/bin/env bash
DEPLOYMENT=$1
for p in $(kubectl get pods | grep ^${DEPLOYMENT}- | 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