# Query regarding the preStop hook

**URL:** <https://discuss.kubernetes.io/t/query-regarding-the-prestop-hook/20771>\
**Category:** General Discussions\
**Created:** [July 28, 2022, 6:28am UTC](https://discuss.kubernetes.io/t/query-regarding-the-prestop-hook/20771 "2022-07-28T06:28:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitkatyal](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/amitkatyal/32/8386_2.png) [@amitkatyal](https://discuss.kubernetes.io/u/amitkatyal)\
**Post date:** [July 28, 2022, 6:28am UTC](https://discuss.kubernetes.io/t/query-regarding-the-prestop-hook/20771/1 "2022-07-28T06:28:45Z")

</div>

Hi Team,

This query is regarding the gracefull shutdown of pod. We have an application running in the k8s cluster which requires 5-10min for state saving during an upgrade scenario.

I came across a k8s native way of gracefull shutdown using preStop lifecycle hook but was having. a doubt if it is okay to add the sleep of 5-10 min in the preStop hook for application to save the state before receiving the SIGTERM signal. Is it safe to do as it seems preStop hook is being called synchronously?

Regards,  
Amit Katyal

### Cluster information:

Kubernetes version: 1.21  
Cloud being used: AWS EKS  
Installation method: terraform  
Host OS: Linux  
CNI and version:  
CRI and version:

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.
