From 46d1aeb940973a11cf9c2ddf56028831358f8b80 Mon Sep 17 00:00:00 2001 From: Pankaj Date: Tue, 13 Aug 2024 02:06:35 +0530 Subject: [PATCH] add port-forward --- scripts/test/kubernetes-setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/test/kubernetes-setup.sh b/scripts/test/kubernetes-setup.sh index a8727cea1..76f489244 100644 --- a/scripts/test/kubernetes-setup.sh +++ b/scripts/test/kubernetes-setup.sh @@ -84,4 +84,10 @@ kubectl apply -f scripts/test/postgres-deployment.yaml cd dev && docker build -t dbt-jaffle-shop:1.0.0 -f Dockerfile.postgres_profile_docker_k8s . kind load docker-image dbt-jaffle-shop:1.0.0 +POD_NAME=$(kubectl get pods -n default -l app=postgres -o jsonpath='{.items[0].metadata.name}') + +echo "$POD_NAME" + +kubectl port-forward --namespace default "$POD_NAME" 5432:5432 & + kubectl get pod \ No newline at end of file