I need to let the container to run 5 minutes after the kubectl \' termination. It needs to do some work before it\'s destroyed. It seems that kubernetes contain
https://pracucci.com/graceful-shutdown-of-kubernetes-pods.html
may this can help you.
There’re some circumstances where a SIGTERM violently kill the application, vanishing all your efforts to gracefully shutdown it. Nginx, for example, quickly exit on SIGTERM.