Will unfinished tasks in the container be terminated when scaling down in Kubernetes?

1

There are 1 best solutions below

0
On BEST ANSWER

Will unfinished tasks in the container be terminated when scaling down in Kubernetes?

Yes, to manage it you have a few options or best practices to follow.

You can check for termination with grace

Default value is 30 seconds so if it's taking longer than 30 seconds make sure you are setting it.

Add and manage the terminationGracePeriodSecond into the YAML config

https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-terminating-with-grace