Last active
June 10, 2021 16:02
-
-
Save darrensapalo/85f57de329361be038ce79512173a0dd to your computer and use it in GitHub Desktop.
Automatically connects to the utils namespace, and then finds the pod with pgadmin, and portforwards it to 4000.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/local/bin/fish | |
# This fish scripts allows one to automatically: | |
# 2. connect to the utils kubens | |
# 3. port-forward the pgadmin service | |
kubens utils | |
set HANDLER_POD_NAME (kubectl get pods -o jsonpath="{.items[*].metadata.name}" | tr -s '[[:space:]]' '\n' | grep pgadmin) | |
kubectl port-forward $HANDLER_POD_NAME 4000:80 | |
# Visit your local browser at http://localhost:4000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment