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.23 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, fission watches functions created in defaultNamespace mentioned helm chart value. If you want to watch additional namespaces, you can mention them via additionalFissionNamespaces helm chart value.

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.20.1"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.20.1 --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.20.1"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.20.1 --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.20.1"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.20.1 --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.20.1"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.20.1 --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.

‘fission’ is the recommended namespace to install 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.20.1"
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.20.1/fission-all-v1.20.1.yaml
kubectl config set-context --current --namespace=default #to change context to default namespace after installation
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.20.1"
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.20.1/fission-all-v1.20.1-minikube.yaml
kubectl config set-context --current --namespace=default #to change context to default namespace after installation
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.20.1"
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.20.1/fission-core-v1.20.1-openshift.yaml
kubectl config set-context --current --namespace=default #to change context to default namespace after installation

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.20.1/fission-v1.20.1-darwin-amd64 \
    && chmod +x fission && sudo mv fission /usr/local/bin/
curl -Lo fission https://github.com/fission/fission/releases/download/v1.20.1/fission-v1.20.1-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.20.1
server:
  fission/core:
    BuildDate: "2023-01-25T04:53:33Z"
    GitCommit: deb3523
    Version: v1.20.1

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.

Ensure that functions are created within the specified namespaces: either the defaultNamespace or any listed in additionalFissionNamespaces from the Helm chart values.

To verify the namespaces the executor is monitoring, inspect the FISSION_RESOURCE_NAMESPACES environment variable using the following command: kubectl get deployment executor -n fission -o yaml | grep -A 2 FISSION

You can pass --namespace or -n flag to fission CLI to specify the namespace for the function or environment.
# 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

Last modified February 28, 2024: Update _index.en.md (bc4f139)