Environment Variables

Environment variables used by Fission CLI


Set FISSION_NAMESPACE to the namespace where the Fission installed.

$ export FISSION_NAMESPACE <namespace>

Fission Router Address

It’s convenient to set the FISSION_ROUTER environment variable to the externally-visible address of the Fission router.

Clusters Only Support NodePort

Here we use minikube for example.

$ export FISSION_ROUTER=$(minikube ip):$(kubectl -n fission get svc router -o jsonpath='{...nodePort}')

Above line translates to IP (from minikube):PORT (from the fission router) e.g., This address is stored in FISSION_ROUTER environment variable.

Cloud Hosted Clusters

If you want to expose the router to the internet, the service type of router service must be set to LoadBalancer. This is the default in the helm chart.

$ kubectl --namespace fission get svc
NAME             TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
router           LoadBalancer     <pending>     80:31314/TCP     11d

If the field EXTERNAL-IP shows <pending>, it means that kubernetes is waiting for cloud provider to allocate the public IP address. It often takes a few minutes to get an IP address.


$ export FISSION_ROUTER=$(kubectl --namespace fission get svc router -o=jsonpath='{..hostname}')

$ export FISSION_ROUTER=$(kubectl --namespace fission get svc router -o=jsonpath='{..ip}')

Check whether there are firewall rules that block you from accessing the IP address.


If your cluster is running in an environment that does not support external load balancer (e.g., minikube), the EXTERNAL-IP of fission router will stay in pending state.

$ kubectl --namespace fission get svc router
NAME      TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
router    LoadBalancer   <pending>   80:31377/TCP   27d

In this case, you can use the port-forward method instead:

# Port-forward
$ kubectl --namespace fission port-forward $(kubectl --namespace fission get pod -l svc=router -o name) <local port>:8888 &
$ export FISSION_ROUTER=<local port>

Now, curl http://${FISSION_ROUTER}/ will open a connection that goes through the port forward you just created. This is useful for local testing of your function.

Last modified September 23, 2020: Markdown lint reformat (#218) (db2e794)