A liveness check tells an orchestrator whether an application is healthy enough to keep running. When liveness is down, Kubernetes can terminate the pod and start a replacement. section 18.3.3
Spring Boot exposes liveness through the Actuator health endpoint as a health group. Enable the probes before Kubernetes can query the liveness status. section 18.3.3
management:
health:
probes:
enabled: true
Enable the liveness and readiness health groups with this application.yml setting. section 18.3.3
Liveness differs from readiness. Readiness controls whether Kubernetes sends traffic; liveness controls whether Kubernetes restarts the application. An application can be alive but temporarily unready during startup. section 18.3.3 section 18.3.2
Kubernetes deployment probe
A Deployment can query /actuator/health/liveness on port 8080 every five seconds after an initial delay. A separate readiness probe can query /actuator/health/readiness so traffic stops during initialization without triggering a restart.
Application availability can also be changed programmatically: publish LivenessState.BROKEN when the application cannot safely continue, or LivenessState.CORRECT when it recovers.






