Install the SonataFlow Operator
This guide describes how to install the SonataFlow Operator in a Kubernetes or OpenShift cluster. The operator is in an early development stage (community only) and has been tested on OpenShift 4.12, Kubernetes {kubernetes_version}, and Minikube.
-
A Kubernetes or OpenShift cluster with admin privileges and
kubectl
installed. -
Alternatively, you can use Minikube or KIND in your local environment. See minimal environment setup and starting the cluster for local development guides.
SonataFlow Operator OpenShift installation
Install
To install the operator on OpenShift refer to the "Adding Operators to a cluster" from the OpenShift’s documentation.
When searching for the operator in the Filter by keyword field, use the word sonataflow
. If you’re installing from the CLI, the operator’s catalog name is sonataflow-operator
.
Uninstall
To remove the operator on OpenShift refer to the "Deleting Operators from a cluster" from the OpenShift’s documentation.
SonataFlow Operator Kubernetes installation
Install
To install the operator on Kubernetes refer to the "How to install an Operator from OperatorHub.io" from the OperatorHub’s documentation.
When searching for the operator in the Search OperatorHub field, use the word sonataflow
.
Uninstall
To remove the operator on Kubernetes follow the document "Uninstall your operator" from the OLM’s documentation.
When searching for the subscription to remove, use the word my-sonataflow-operator
.
SonataFlow Operator Manual Installation
If you’re running on Kubernetes or OpenShift, it is highly recommended to install the operator from the OperatorHub or OpenShift Console instead since the installation is managed by OLM. Use this method only if you need a snapshot version or you’re running locally on Minikube or KIND. |
-
You have set up your environment according to the minimal environment setup guide.
-
You have the cluster instance up and running. See starting the cluster for local development guide.
Install
To install the SonataFlow Operator, you can use the following command:
kubectl create -f https://raw.githubusercontent.com/apache/incubator-kie-kogito-serverless-operator/main/operator.yaml
Replace main
with specific version if needed:
kubectl create -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/<version>/operator.yaml
<version>
could be 1.44.1
for instance.
You can follow the deployment of the SonataFlow Operator:
kubectl get pod -n sonataflow-operator-system --watch
A successful installation should have an output like this:
NAME READY STATUS RESTARTS AGE
sonataflow-operator-controller-manager-948547ffd-sr2j2 0/2 ContainerCreating 0 6s
sonataflow-operator-controller-manager-948547ffd-sr2j2 1/2 Running 0 7s
sonataflow-operator-controller-manager-948547ffd-sr2j2 2/2 Running 0 20s
You can also follow the operator’s log:
kubectl logs deployment/sonataflow-operator-controller-manager -n sonataflow-operator-system -f
Once the operator is running, it will watch for instances of the SonataFlow Custom Resources (CR). Using CRs, you can configure your SonataFlow environment and define Workflows and builds to be handled by the operator.
Uninstall
To uninstall the SonataFlow Operator, first, you must delete all the SonataFlow Custom Resources (CR) instances managed by it. Once the CRs are deleted, you can then delete all resources created during the operator installation.
To delete every CR managed by the operator in your cluster, you can run these series of commands:
kubectl delete --all workflow --all-namespaces
kubectl delete --all sonataflowbuild --all-namespaces
kubectl delete --all sonataflowplatform --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:
kubectl get deployment sonataflow-operator-controller-manager -n sonataflow-operator-system -o jsonpath="{.spec.template.spec.containers[?(@.name=='manager')].image}"
quay.io/kiegroup/kogito-serverless-operator-nightly:latest
kubectl delete -f https://raw.githubusercontent.com/apache/incubator-kie-kogito-serverless-operator/<version>.x/operator.yaml
The URL should be the same as the one you used when installing the operator. |
Found an issue?
If you find an issue or any misleading information, please feel free to report it here. We really appreciate it!