I have a Spring Boot 2.3.1 application with actuator deployed on Kubernetes with the corresponding K8s probes mapped against the actuator endpoints:
livenessProbe:
httpGet:
path: /actuator/health/liveness
...
readinessProbe:
httpGet:
path: /actuator/health/readiness
...
I'd like to detect when K8s invokes each of the probes, get the execution result and some other pieces of info (pod name...) and send it to an http endpoint.
How could I detect those invocations and access its result? Is there some kind of Spring hook/listener that allows me to do it?