Last active
May 30, 2019 19:35
-
-
Save Stono/bb53f4fddc3cf4676d1d065a3d1b3a98 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
set +e | |
rm -rf /tmp/istio-debug* | |
mkdir /tmp/istio-debug | |
cd /tmp/istio-debug | |
for pod in $(kubectl --namespace=istio-system get pods --no-headers -l istio=pilot | awk '{print $1}'); do | |
echo "Gathering info from $pod" | |
mkdir $pod | |
cd $pod | |
echo " - endpointShardz" | |
kubectl --namespace=istio-system exec -c discovery $pod -- curl --max-time 10 -s http://127.0.0.1:8080/debug/endpointShardz > endpointShardz | |
echo " - configz" | |
kubectl --namespace=istio-system exec -c discovery $pod -- curl --max-time 10 -s http://127.0.0.1:8080/debug/configz > configz | |
echo " - endpointz" | |
kubectl --namespace=istio-system exec -c discovery $pod -- curl --max-time 10 -s http://127.0.0.1:8080/debug/endpointz > endpointz | |
echo " - discovery log" | |
kubectl --namespace=istio-system logs $pod discovery > discovery.stdout.log | |
echo " - proxy log" | |
kubectl --namespace=istio-system logs $pod istio-proxy > discovery.envoy.log | |
echo " - adsz" | |
kubectl --namespace=istio-system exec -c discovery $pod -- curl --max-time 10 -s http://127.0.0.1:8080/debug/adsz > adsz | |
cd .. | |
done | |
echo "Gathering cluster information" | |
echo " - endpoints" | |
kubectl get ep --all-namespaces -o yaml > endpoints.yaml | |
echo " - services" | |
kubectl get svc --all-namespaces -o yaml > services.yaml | |
echo " - pods" | |
kubectl get pods --all-namespaces -o yaml > pods.yaml | |
cd /tmp | |
tar cvzf istio-debug.tar.gz istio-debug/ | |
echo "Info gathering complete, please send /tmp/istio-debug.tar.gz to the istio team" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment