add set-port-forward.sh which uses kubectl port-forward instead of ssh tunnels

This commit is contained in:
Maarten de Waard 2022-05-16 17:28:52 +02:00
parent 684c461e54
commit 8aadfb0860
No known key found for this signature in database
GPG key ID: 1D3E893A657CC8DA

18
set-port-forward.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
echo "
kratos admin port will be at localhost: 8000
kratos public port will be at localhost: 8080
hydra admin port will be at localhost: 4445
mysql port will be at localhost: 3306
"
# Kill all processes when this script ends
trap "exit" INT TERM ERR
trap "kill 0" EXIT
# Add forwarded ports for all processes
kubectl port-forward -n stackspin service/kratos-admin 8000:80 &
kubectl port-forward -n stackspin service/kratos-public 8080:80 &
kubectl port-forward -n stackspin service/hydra-admin 4445:4445 &
kubectl port-forward -n stackspin service/single-sign-on-database-mariadb 3306:3306