How does the scale function in Kubernetes ensure that the current task or request is completed when scaling down?

93 views Asked by At

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

1

There are 1 answers

0
Harsh Manvar 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