blob: 367eb33438d6bd9dd56aed237a2879b86601b844 [file] [log] [blame]
#!/bin/bash
echo "Starting bouncer.sh"
# KUBECONFIG should be set in yaml file.
# PORT_ON_THANOS_QUERY should be set in the yaml file.
# Echo something useful into the logs.
kubectl config get-clusters
# Set up the reverse port-forward.
kubectl get pod -l app=thanos-query -o jsonpath="{.items[0].metadata.name}"
nc -vv 127.0.0.1 9001 -c "kubectl exec -i $(kubectl get pod -l app=thanos-query -o jsonpath=\"{.items[0].metadata.name}\") -- nc -vv -l -p ${PORT_ON_THANOS_QUERY}"