Permalink
Browse files

Added new kforward function to forward Kubernetes ports to local

  • Loading branch information...
eko committed Dec 16, 2018
1 parent cbd130e commit aa0ec75209f2547e2fc6ddcc12ebe2fb8109535a
Showing with 7 additions and 0 deletions.
  1. +7 −0 .functions
@@ -370,3 +370,10 @@ function rabbitgraph {
done | \
jplot --steps 1200 ready+unacked+total+consumers+publish_rate+ack_rate+redeliver_rate
}

# Kubernetes port-forward alias
# Usage: kforward context namespace pod-name ports
function kforward {
podName=`kubectl get pods -n $2 --context $1 | grep $3 | cut -d' ' -f1`
kubectl port-forward --context=$1 -n $2 $podName $4
}

0 comments on commit aa0ec75

Please sign in to comment.