I am trying to achieve graceful shutdown for my spring app which runs on kubernetes. I have defined preDestroy method to perform some cleanup before shutdown but I see that container is removed before preDestroy method completes his execution.
What am I doing wrong actually here ?