Skip to content

Configure health probes

Each container that lands on our platform should be configured with Liveness, Readiness, and Startup probes as defined by Kubernetes standards.

A liveness probe indicates whether the application running. In our example application we have an example on how to configure a liveness probe for a Springboot application. To be clear: This is a specific example for a Springboot application and should be used as an example. First, you set the ‘management.health.livenessState.enabled’ property to true in your application.properties file:

management.health.livenessState.enabled=true

In the deployment definition, you configure the probe itself:

liveness-probe-example.yaml
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 8080
periodSeconds: 30
initialDelaySeconds: 60

A readiness probe demonstrates if the container is ready to respond to requests. Also for the readiness probe, we have a practical Springboot application example. This works the same way as for the liveness probe by setting a property in the application.properties file:

management.health.readinessState.enabled

The readiness probe configuration is also in the deployment definition:

readiness-probe-example.yaml
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 8080
periodSeconds: 10
initialDelaySeconds: 60

Indicates whether the application within the container is started. We do not have an example for this yet.