Install the Kogito Serverless Workflow Operator

This guide describes how to install the Kogito Serverless Workflow Operator in a Kubernetes cluster. The operator is in an early development stage (community only) and has been tested on Kubernetes 1.22+, and Minikube.

Prerequisites
  • A Kubernetes cluster with admin privileges. Alternatively, you can use Minikube or KIND.

  • kubectl command-line tool is installed. Otherwise, Minikube provides it.

Prepare a Minikube instance

You can safely skip this section if you’re not using Minikube.

Prerequisites
  • A machine with at least 8GB memory and a CPU with 8 cores

  • Docker or Podman installed

Run the following command to create a new instance capable of installing the operator and deploy workflows:

minikube start --cpus 4 --memory 4096 --addons registry --addons metrics-server --insecure-registry "10.0.0.0/24" --insecure-registry "localhost:5000"

To speed up the build time, you can increase CPUs and memory options so that your minikube instance will have more resources. For example, use --cpus 12 --memory 16384. In order to work, you will have to recreate your instance.

If it does not work with the default driver, also known as docker, you can try to start with the podman driver as follows:

Start minikube with podman driver
minikube start [...] --driver podman

Install the Kogito Serverless Workflow Operator

In order to have an up-and-running instance of the Kogito Serverless Workflow Operator you can use the following command:

Install Kogito Serverless Workflow Operator on Kubernetes
kubectl create -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/main/operator.yaml

You can follow the deployment of the Kogito Serverless Workflow Operator:

Watch the Kogito Serverless Workflow Operator pod
kubectl get pod -n kogito-serverless-operator-system --watch

A successful installation should have an output like this:

Successful Installation Output
NAME                                                            READY   STATUS              RESTARTS   AGE
kogito-serverless-operator-controller-manager-948547ffd-sr2j2   0/2     ContainerCreating   0          6s
kogito-serverless-operator-controller-manager-948547ffd-sr2j2   1/2     Running             0          7s
kogito-serverless-operator-controller-manager-948547ffd-sr2j2   2/2     Running             0          20s

You can also follow the operator’s log:

Watch the Kogito Serverless Workflow Operator pod logs
kubectl logs deployment/kogito-serverless-operator-controller-manager -n kogito-serverless-operator-system -f

Once the operator is running, it will watch for new custom resources (CR) so that you can prepare your environment to be ready to create a new Kogito Serverless Workflow application based on the definitions you will send to the operator.

To check if the definitions are correclty installed, try running:

Check if the CRDs are correctly installed
kubectl get crds | grep kogito
kogitoserverlessbuilds.sw.kogito.kie.org      2023-03-08T18:31:15Z
kogitoserverlessplatforms.sw.kogito.kie.org   2023-03-08T18:31:15Z
kogitoserverlessworkflows.sw.kogito.kie.org   2023-03-08T18:31:15Z

Uninstall the Operator

To uninstall the Kogito Serverless Workflow Operator, first you should remove all the object instances managed by it. Then, you can delete every object created during the installation.

To delete every object instance managed by the workflow in your cluster, you can run these series of commands:

Delete every Kogito Serverless Workflow object instances
kubectl delete --all workflow --all-namespaces
kubectl delete --all kogitoserverlessbuild --all-namespaces
kubectl delete --all kogitoserverlessplatform --all-namespaces

Alternatively, if you created everything under the same namespace, deleting the given namespace has the same outcome.

To uninstall the correct version of the operator, first you must get the current version by running:

Getting the operator version
kubectl get deployment kogito-serverless-operator-controller-manager -n kogito-serverless-operator-system -o jsonpath="{.spec.template.spec.containers[?(@.name=='manager')].image}"

quay.io/kiegroup/kogito-serverless-operator-nightly:1.34.0

The operator manager image reflects the current operator’s version. Replace the major and minor version names in the command below. For example, if the image version is 1.34.0 use 1.34 in the placeholder:

Uninstalling the operator
kubectl delete -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/<version>.x/operator.yaml

If you’re running a snapshot version, use this URL instead https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/main/operator.yaml.

Found an issue?

If you find an issue or any misleading information, please feel free to report it here. We really appreciate it!