I am running a Java Spring Boot boot application on Tomcat in a Kubernetes cluster, I am using a lifecycle hook to shut down Tomcat before the container gets terminated. Also defining a termination grace period of 30 secs.
Expected behaviour: tomcat shuts down gracefully when I kill a pod or delete a deployment.
Actual behaviour: tomcat shuts down abruptly.
lifecycle:
preStop:
exec:
command:
- /usr/local/tomcat/bin/catalina.sh
Can anyone help please?
