Skip to content

Fission.io on Kub8s

Fission.io

This tutorial explains how to deploy a kubernetes cluster and run fission.io on it.

More detailed information is available here.

Deploy the Kubernetes cluster

$ openstack coe cluster create myfissionio --keypair mykey \
    --cluster-template kubernetes-1.15.3-2 --node-count 2

$ openstack coe cluster list
+------+---------------+------------+--------------+--------------------+
| uuid | name          | node_count | master_count | status             |
+------+---------------+------------+--------------+--------------------+
| .... | myfissionio   | 2          | 1            | CREATE_COMPLETE    |
+------+---------------+------------+--------------+--------------------+

Deploy fission.io

Choose one of the cluster nodes for reference later (one with scheduling enabled):

kubectl get node
NAME            STATUS                     AGE
137.138.6.111   Ready                      5d
137.138.7.22    Ready,SchedulingDisabled   5d
137.138.7.33    Ready                      5d

Deploy fission.io using their manifests:

kubectl create -f http://fission.io/fission.yaml
kubectl create -f http://fission.io/fission-nodeport.yaml

Fetch the client and prepare your environment:

export FISSION_URL=http://137.138.7.33:31313
export FISSION_ROUTER=http://137.138.7.33:31314/
curl http://fission.io/linux/fission > fission && chmod +x fission

And that's it. Below is an example of how to setup a nodejs based environment and script:

./fission env create --name nodejs --image fission/node-env
echo 'module.exports = function(context, callback) { callback(200, "Hello, world!\n"); }' > hello.js
./fission function create --name hello --env nodejs --code hello.js
./fission route create --method GET --url /hello --function hello

And to access it we would:

curl http://137.138.7.33:31314/hello