naman.gupta | ec6b6cf | 2022-12-12 17:03:19 +0530 | [diff] [blame] | 1 | #!/bin/bash |
2 | # fail on error | ||||
3 | set -eux | ||||
4 | pod=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=a1mediator,app.kubernetes.io/instance=a1" -o jsonpath="{.items[0].metadata.name}") | ||||
5 | # this listener must run to forward the port, it's not just a config change | ||||
6 | # it logs a line periodically that don't add much value, capture in a file. | ||||
7 | rm forward.log | ||||
8 | kubectl port-forward "$pod" 10000:10000 > forward.log 2>&1 & |