SIGTERM doesn't invoke the termination handler

In some cases, the termination handler of a process isn't triggered by SIGTERM. For instance, sending SIGTERM to nginx actually causes a fast shutdown. To gracefully close an nginx controller, we have to send SIGQUIT with nginx -s quit instead.

The full list of supported actions on the signal of nginx is listed here: http://nginx.org/en/docs/control.html.

Now, another problem arises: how do we send signals other than SIGTERM to a container when deleting a pod? We can modify the behavior of our program to trap SIGTERM, but there's nothing we can do about popular tools such as nginx. For such a situation, we can use life cycle hooks.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset