Skip to content

Commit f55e4c0

Browse files
committed
Add note about Kubernetes termination grace period
Closes gh-26469
1 parent 67fe60b commit f55e4c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/deployment.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ spec:
192192

193193
Once the pre-stop hook has completed, SIGTERM will be sent to the container and <<spring-boot-features#boot-features-graceful-shutdown,graceful shutdown>> will begin, allowing any remaining in-flight requests to complete.
194194

195+
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).
196+
If the containers are still running after the grace period, they are sent the SIGKILL signal and forcibly removed.
197+
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.
198+
195199

196200

197201
[[cloud-deployment-heroku]]

0 commit comments

Comments
 (0)