From 8aadfb08601705c4e79802ab9e96563e179f0885 Mon Sep 17 00:00:00 2001 From: Maarten de Waard Date: Mon, 16 May 2022 17:28:52 +0200 Subject: [PATCH] add set-port-forward.sh which uses kubectl port-forward instead of ssh tunnels --- set-port-forward.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 set-port-forward.sh diff --git a/set-port-forward.sh b/set-port-forward.sh new file mode 100755 index 0000000..2577a33 --- /dev/null +++ b/set-port-forward.sh @@ -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