Environment Variables
Environment variables used by Fission CLI
Welcome! This guide will get you up and running with Fission on a Kubernetes cluster.
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.
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 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 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.
With 1.15 release,
fission-core
is removed. Please usefission-all
chart for migration.Refer 1.15 release notes for more details.
If you are upgrading Fission, do check upgrade guide
serviceType, routerServiceType can be
NodePort
orLoadBalancer
for external access to Fission in below steps. You can useClusterIP
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.16.0"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.16.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.16.0"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.16.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.16.0"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.16.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.16.0"
helm repo add fission-charts https://fission.github.io/fission-charts/
helm repo update
helm install --version v1.16.0 --namespace $FISSION_NAMESPACE fission \
--set logger.enableSecurityContext=true \
fission-charts/fission-all
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 usehelm
or generate yaml for first withhelm template
command.
Choose one of the following commands to run:
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.16.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.16.0/fission-all-v1.16.0.yaml
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.16.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.16.0/fission-all-v1.16.0-minikube.yaml
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.16.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.16.0/fission-core-v1.16.0-openshift.yaml
Fission CLI helps you to operate Fission. Checkout Fission CLI reference for more.
curl -Lo fission https://github.com/fission/fission/releases/download/v1.16.0/fission-v1.16.0-darwin-amd64 \
&& chmod +x fission && sudo mv fission /usr/local/bin/
curl -Lo fission https://github.com/fission/fission/releases/download/v1.16.0/fission-v1.16.0-linux-amd64 \
&& chmod +x fission && sudo mv fission /usr/local/bin/
nix-env -iA nixos.fission
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.
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 used by Fission CLI
Installation guide for offline on-premise.
Docker Desktop specific setup
OpenShift specific setup
Guide to set up basic authentication with Fission
Advanced setup guide for Fission installation
Upgrade guidance 1.13 onwards
Fission Compatibility with environments, Keda and Keda Connectors
Uninstallation guide for Fission