Skip to content

Instantly share code, notes, and snippets.

@rvennam
Last active August 25, 2022 13:11
Show Gist options
  • Save rvennam/07a774e2b72da558eabdd70732073373 to your computer and use it in GitHub Desktop.
Save rvennam/07a774e2b72da558eabdd70732073373 to your computer and use it in GitHub Desktop.
#!/bin/sh
kubectl logs deployment/gloo-mesh-mgmt-server -n gloo-mesh > mgmt-server.log
kubectl port-forward deployment/gloo-mesh-mgmt-server -n gloo-mesh 9091 >/dev/null 2>&1 &
pid=$!
sleep 3
curl -s localhost:9091/snapshots/input > input.json
curl -s localhost:9091/snapshots/output > output.json
zip snapshots.zip input.json output.json mgmt-server.log
echo "Snapshots: ${PWD}/snapshots.zip"
rm input.json output.json mgmt-server.log
kill $pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment