Installing Fission

Installation guide for Fission installation

Welcome! This guide will get you up and running with Fission on a Kubernetes cluster.

Prerequisites

First, let’s ensure you have the Kubernetes CLI and Helm installed and ready along with a Kubernetes Cluster. If you already have Helm, skip ahead to the fission install.

Kubernetes Cluster

If you don’t have a Kubernetes cluster, here’s a official guide to set one up.

Fission requires Kubernetes 1.19 or higher

Kubectl

Kubectl is a command line interface for running commands against Kubernetes clusters, visit kubectl docs to see how to install it.

Next, ensure you have access to a cluster. Do this by using kubectl to check your Kubernetes version:

kubectl version

Helm

Helm is an installer for Kubernetes. If you already use helm, skip to the next section.

If you cannot use Helm, there is an alternative installation method possible; see installing without Helm.

To install helm, first you’ll need the helm CLI. Visit here to see how to install it.

Helm v2 is deprecated, Fission can be installed via Helm v3. You can skip the following and head over Fission installation if you’re using Helm v3.

Install Fission

With Helm

With 1.15 release, fission-core is removed. Please use fission-all chart for migration.

Refer 1.15 release notes for more details.

If you are upgrading Fission, do check upgrade guide

With 1.18 release, the namespaces fission-function and fission-builder will no longer be created. Instead, all resources will be created in the same namespace for all namespaces.

Refer 1.18 release notes for more details.

serviceType, routerServiceType can be NodePort or LoadBalancer for external access to Fission in below steps. You can use ClusterIP if you want to access Fission from within the cluster.

See Customizing the Chart Before Installing. To see all configurable options with detailed comments:

helm show values fission-charts/fission-all

Checkout Fission on ArtifactHub for chart supported values.

See how to add token to kubeconfig if you’re not able to connect to cluster.

export FISSION_NAMESPACE="fission"
kubectl create namespace $FISSION_NAMESPACE
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.18.0"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.18.0 --namespace $FISSION_NAMESPACE fission fission-charts/fission-all
export FISSION_NAMESPACE="fission"
kubectl create namespace $FISSION_NAMESPACE
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.18.0"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.18.0 --namespace $FISSION_NAMESPACE fission \
  --set serviceType=NodePort,routerServiceType=NodePort \
  fission-charts/fission-all
export FISSION_NAMESPACE="fission"
kubectl create namespace $FISSION_NAMESPACE
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.18.0"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.18.0 --namespace $FISSION_NAMESPACE fission \
  --set serviceType=NodePort,routerServiceType=NodePort,logger.enableSecurityContext=true \
  fission-charts/fission-all
export FISSION_NAMESPACE="fission"
kubectl create namespace $FISSION_NAMESPACE
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.18.0"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.18.0 --namespace $FISSION_NAMESPACE fission \
    --set logger.enableSecurityContext=true \
    fission-charts/fission-all

Without helm

This method uses kubectl apply to install Fission. You can edit the YAML file before applying it to your cluster, if you want to change anything in it. Create namespace for fission installation.

kubectl create namespace fission
If you want to install in another namespace, please consider to use helm or generate yaml for first with helm template command.

Choose one of the following commands to run:

kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.18.0"
export FISSION_NAMESPACE="fission"
kubectl create namespace $FISSION_NAMESPACE
kubectl config set-context --current --namespace=$FISSION_NAMESPACE
kubectl apply -f https://github.com/fission/fission/releases/download/v1.18.0/fission-all-v1.18.0.yaml
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.18.0"
export FISSION_NAMESPACE="fission"
kubectl create namespace $FISSION_NAMESPACE
kubectl config set-context --current --namespace=$FISSION_NAMESPACE
kubectl apply -f https://github.com/fission/fission/releases/download/v1.18.0/fission-all-v1.18.0-minikube.yaml
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.18.0"
export FISSION_NAMESPACE="fission"
kubectl create namespace $FISSION_NAMESPACE
kubectl config set-context --current --namespace=$FISSION_NAMESPACE
kubectl apply -f https://github.com/fission/fission/releases/download/v1.18.0/fission-core-v1.18.0-openshift.yaml

Install Fission CLI

Fission CLI helps you to operate Fission. Checkout Fission CLI reference for more.

curl -Lo fission https://github.com/fission/fission/releases/download/v1.18.0/fission-v1.18.0-darwin-amd64 \
    && chmod +x fission && sudo mv fission /usr/local/bin/
curl -Lo fission https://github.com/fission/fission/releases/download/v1.18.0/fission-v1.18.0-linux-amd64 \
    && chmod +x fission && sudo mv fission /usr/local/bin/
nix-env -iA nixos.fission
For Windows, you can use the linux binary on WSL. Or you can download this windows executable: fission.exe

Verify fission installation

Once you are done with fission installation, run these commands to make sure fission is installed successfully and all core components of fission are working properly.

To check fission is installed successfully, run this command and verify both client and server version should be same.

$ fission version
client:
  fission/core:
    BuildDate: "2023-01-25T04:56:25Z"
    GitCommit: deb3523
    Version: v1.18.0
server:
  fission/core:
    BuildDate: "2023-01-25T04:53:33Z"
    GitCommit: deb3523
    Version: v1.18.0

To check fission core components are working properly, run this command.

$ fission check
fission-services
--------------------
√ executor is running fine
√ router is running fine
√ storagesvc is running fine
√ webhook is running fine

fission-version
--------------------
√ fission is up-to-date

If you have enabled authentication while installing fission, mentioned above commands won’t show proper result. You need to generate token to make it work.

See How to generate auth token, if authentication is enabled.

Run an example

Finally, you’re ready to use Fission!

It might take one or two mintues for fission to start running. check the status using kubectl get pods -n fission.
# Add the stock NodeJS env to your Fission deployment
$ fission env create --name nodejs --image fission/node-env

# A javascript function that prints "hello world"
$ curl -LO https://raw.githubusercontent.com/fission/examples/main/nodejs/hello.js

# Upload your function code to fission
$ fission function create --name hello-js --env nodejs --code hello.js

# Test your function.  This takes about 100msec the first time.
$ fission function test --name hello-js
Hello, world!
# Add the stock Python env to your Fission deployment
$ fission env create --name python --image fission/python-env

# A Python function that prints "hello world"
$ curl -LO https://raw.githubusercontent.com/fission/examples/main/python/hello.py

# Upload your function code to fission
$ fission function create --name hello-py --env python --code hello.py

# Test your function.  This takes about 100msec the first time.
$ fission function test --name hello-py
Hello, world!
# Add the stock Go env to your Fission deployment
$ fission env create --name go --image fission/go-env-1.16 --builder fission/go-builder-1.16

# A Go function that prints "hello world"
$ curl -LO https://raw.githubusercontent.com/fission/examples/main/go/hello-world/hello.go

# Upload your function code to fission
$ fission function create --name hello-go --env go --src hello.go --entrypoint Handler

# Wait for your source code to be built, package status should be succeeded. This may take a few minutes.
$ fission pkg list | grep hello-go
hello-go-8bb933b5-b12b-499b-a951-ee2245c8f1b5 succeeded    go     23 Nov 21 10:55 IST

# Test your function. This takes about 100msec the first time.
$ fission function test --name hello-go
Hello, world!
# Add the stock Java env to your Fission deployment
$ fission environment create --name java --image fission/jvm-env --builder fission/jvm-builder --keeparchive --version 3

# A Java function that prints "hello world"
$ mkdir -p src/main/java/io/fission/
$ curl -L https://raw.githubusercontent.com/fission/examples/main/java/hello-world/src/main/java/io/fission/HelloWorld.java \
  -o src/main/java/io/fission/HelloWorld.java
# pom.xml contains dependencies for the function.
$ curl -LO https://raw.githubusercontent.com/fission/environments/master/jvm/examples/java/pom.xml

# Upload your function code to fission via zip
$ zip java-src-pkg.zip -r src/ pom.xml
$ fission package create --name hello-pkg --env java --src java-src-pkg.zip
Package 'hello-pkg' created

# Wait for your source code to be built, package status should be succeeded. This may take a few minutes.
$ fission pkg list | grep hello-pkg
hello-pkg                                     succeeded    java   23 Nov 21 11:19 IST

# Test your function. This takes about 100msec the first time.
$ fission function create --name hello-java --env java --pkg hello-pkg --entrypoint io.fission.HelloWorld
$ fission function test --name hello-java
Hello World!

For more language tutorials, visit Language.

What’s next?

If something went wrong, we’d love to help – please drop by the Fission slack and ask for help.

Check out the examples for some example functions.


Environment Variables

Environment variables used by Fission CLI

Offline On-Premise

Installation guide for offline on-premise.

Docker Desktop

Docker Desktop specific setup

OpenShift

OpenShift specific setup

Authentication

Guide to set up basic authentication with Fission

Advanced Setup

Advanced setup guide for Fission installation

Upgrade Guide

Upgrade guidance 1.13 onwards

Compatibility

Fission Compatibility with environments, Keda and Keda Connectors

Uninstalling Fission

Uninstallation guide for Fission