Deploying SonataFlow Management Console on Kubernetes

This document describes how to deploy the SonataFlow Management Console on Kubernetes

The SonataFlow Management Console is a web interface designed to manage and monitor workflows. It allows users to initiate workflows, trigger Cloud Events, and monitor their execution.

Prerequisites

Set up Kubernetes and deploy your SonataFlow application

The SonataFlow Management Console relies on the underlying services of the SonataFlow application, including the Data Index service. The Data Index provides data from workflow executions, enabling the Management Console to display workflow information.

Ensure that your Data Index service is deployed and accessible before deploying the Management Console.

(Optional) Deploy Keycloak for production

If you already have Keycloak deployment or server available you can skip this section.

For production environments, deploy Keycloak to handle authentication or choose your own OAuth2 server. You can refer to the SonataFlow Keycloak documentation here.

Deploy SonataFlow Management Console

Create the deployment for the SonataFlow Management Console by applying the following YAML definition:

Example configuration in sonataflow-management-console-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sonataflow-management-console
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sonataflow-management-console
  template:
    metadata:
      labels:
        app: sonataflow-management-console
    spec:
      containers:
        - name: sonataflow-management-console
          image: apache/incubator-kie-sonataflow-management-console:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
          env:
            - name: SONATAFLOW_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE
              value: DEV (1)
            - name: SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT
              value: publicly.accesible.url.of.data-index-service/graphql (2)
1 (Optional) Environment mode: "PROD" or "DEV". PROD enables Keycloak integration.
2 The URL to the Data Index Deployment created here.
Please note it’s required the Data Index URL to be exposed.
Apply SonataFlow Management Console Deployment
kubectl apply -f sonataflow-management-console-deployment.yaml

Create the Service

Once the deployment is created, expose it through a service. Create a service definition by applying the following YAML:

Example configuration in sonataflow-management-console-service.yaml
apiVersion: v1
kind: Service
metadata:
  name: sonataflow-management-console-service
spec:
  selector:
    app: sonataflow-management-console
  ports:
    - name: http
      protocol: TCP
      port: 8080
      targetPort: 8080
Apply SonataFlow Management Console Service
kubectl apply -f sonataflow-management-console-service.yaml

This will create a service exposing the SonataFlow Management Console.

Create the Route (OpenShift only)

Finally, expose the service with a route, so that it can be accessed externally.

Create the route by applying the following YAML:

Example configuration in sonataflow-management-console-route.yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: sonataflow-management-console-route
spec:
  to:
    kind: Service
    name: sonataflow-management-console-service
  port:
    targetPort: http
Apply SonataFlow Management Console Route
kubectl apply -f sonataflow-management-console-route.yaml

Create the Ingress (Kubernetes only)

For Kubernetes you can expose the SonataFlow Management Console using an Ingress.

To create an Ingress, refer to the official Kubernetes documentation here: Kubernetes Ingress Guide.

Optional: Keycloak authentication for Production

In a production environment, you can integrate the SonataFlow Management Console with a Keycloak server for authentication or any OAuth2 server.

Set the following environment variables in your deployment:

  • SONATAFLOW_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT="PROD"

  • KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL – The Keycloak realm’s health check URL.

  • KOGITO_CONSOLES_KEYCLOAK_URL – The Keycloak server URL.

Found an issue?

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