Chapter 12. Probes for Red Hat build of Kogito microservices on Red Hat OpenShift Container Platform


The probes in Red Hat OpenShift Container Platform verify that an application is working or it needs to be restarted. For Red Hat build of Kogito microservices on Red Hat build of Quarkus and Spring Boot, probes interact with the application using an HTTP request, defaulting to the endpoints that are exposed by an extension. Therefore, to run your Red Hat build of Kogito microservices on Red Hat OpenShift Container Platform, you must import the extensions to provide application availability information for the liveness, readiness, and startup probes.

You can add the health check extension for the Red Hat build of Kogito services that are based on Red Hat build of Quarkus on Red Hat OpenShift Container Platform.

Procedure

In a command terminal, navigate to the pom.xml file of your project and add the following dependency for the quarkus-smallrye-health extension:

SmallRye Health dependency for Red Hat build of Quarkus applications on Red Hat OpenShift Container Platform

<dependencies>
  <dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-smallrye-health</artifactId>
  </dependency>
</dependencies>
Copy to Clipboard Toggle word wrap

You can add the health check extension for the Red Hat build of Kogito microservices that are based on Spring Boot on Red Hat OpenShift Container Platform.

Procedure

In a command terminal, navigate to the pom.xml file of your project and add the following Spring Boot actuator dependency:

Spring Boot actuator dependency for Spring Boot applications on Red Hat OpenShift Container Platform

<dependencies>
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
  </dependency>
</dependencies>
Copy to Clipboard Toggle word wrap

You can also configure the custom endpoints for the liveness, readiness, and startup probes.

Procedure

  1. Define the probes in the KogitoRuntime YAML file of your project, as shown in the following example:

Example Red Hat build of Kogito microservice custom resource with custom probe endpoints

apiVersion: rhpam.kiegroup.org/v1 # Red Hat build of Kogito API for this service
kind: KogitoRuntime
metadata:
  name: process-quarkus-example # Application name
spec:
  replicas: 1
  probes:
    livenessProbe:
      httpGet:
        path: /probes/live # Liveness endpoint
        port: 8080
    readinessProbe:
      httpGet:
        path: /probes/ready # Readiness endpoint
        port: 8080
    startupProbe:
      tcpSocket:
        port: 8080
Copy to Clipboard Toggle word wrap

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat