[ad_1]
what you need is a Health Check Endpoint, so Kubernetes (but also locally Docker) can test if your application is ready or not.
Consider using Spring Actuator and enable the health endpoint. You can find the information here at this link: https://www.vojtechruzicka.com/spring-boot-actuator/
Once you have the Actuator active, you can configure in your Kubernetes Deployment YAML the readiness- and livenessProbe and the Docker HEALTHCHECK keyword
[ad_2]