From f55e4c08f53527afd591d9aecd22bf24bea8481c Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Fri, 28 May 2021 14:28:44 -0700 Subject: [PATCH] Add note about Kubernetes termination grace period Closes gh-26469 --- .../spring-boot-docs/src/docs/asciidoc/deployment.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment.adoc index 347da4caa369..f7db2d797d63 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment.adoc @@ -192,6 +192,10 @@ spec: Once the pre-stop hook has completed, SIGTERM will be sent to the container and <> will begin, allowing any remaining in-flight requests to complete. +NOTE: When Kubernetes sends a SIGTERM signal to the pod, it waits for a specified time called the termination grace period (the default for which is 30 seconds). +If the containers are still running after the grace period, they are sent the SIGKILL signal and forcibly removed. +If the pod takes longer than 30 seconds to shut down, which could be because you've increased spring.lifecycle.timeout-per-shutdown-phase, make sure to increase the termination grace period by setting the `terminationGracePeriodSeconds` option in the Pod YAML. + [[cloud-deployment-heroku]]