Graceful shutdown stops accepting new work, lets in-progress work finish, and then exits. In Kubernetes, a pre-stop hook can begin this process before the container receives SIGTERM. section 6.3.2
Gracefully stopping Nginx
Nginx normally closes open connections immediately when it receives SIGTERM. Running nginx -s quit instead stops new connections, waits for in-flight requests, and then exits. A pre-stop hook can run this command before Kubernetes sends SIGTERM. section 6.3.2



