setting serviceType to ClusterIP as default for fission controller and corresponding changes in fission cli to be able to port-forward the controller pod.
24 lines
348 B
Bash
Executable File
24 lines
348 B
Bash
Executable File
#!/bin/bash
|
|
|
|
namespace=$1
|
|
if [ -z "$namespace" ]
|
|
then
|
|
namespace=fission
|
|
fi
|
|
|
|
svc=$1
|
|
if [ -z "$svc" ]
|
|
then
|
|
svc=nats-streaming
|
|
fi
|
|
|
|
port=$2
|
|
if [ -z "$port" ]
|
|
then
|
|
port=8888
|
|
fi
|
|
|
|
kubectl get pods -l svc=$svc -o name --namespace $namespace | \
|
|
sed 's/^.*\///' | \
|
|
xargs -I{} kubectl port-forward {} $port:$port -n $namespace &
|