Skip to content

Instantly share code, notes, and snippets.

@mattmattox
Last active April 29, 2021 23:26
Show Gist options
  • Save mattmattox/bb84096dd8b4e49b43258415ef1f2b1e to your computer and use it in GitHub Desktop.
Save mattmattox/bb84096dd8b4e49b43258415ef1f2b1e to your computer and use it in GitHub Desktop.
grab-ingress-logs.sh
#!/bin/bash
for POD in $(kubectl get pods -n ingress-nginx -l app=ingress-nginx -o NAME | awk -F'/' '{print $1}');
do
kubectl --kubeconfig $KUBECONFIG -n ingress-nginx logs $POD > ./logs-"$POD"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment