IIUC, no.

Node crashes will not execute a preStop hook and there is no way for
Kubernetes to guarantee that.

But what are you trying to solve, really?
Or, in other words, how would you solve it without Kubernetes? Probably the
same solution applies to Kubernetes?

On Monday, April 16, 2018, <gei...@gmail.com> wrote:

> I would like to take particular actions when a K8 Pod, or the node its
> running on, crashes/restarts/etc -- basically notify another part of the
> application that this has happened. I also need this to be guaranteed to
> execute. Can a kubernetes PreStop hook accomplish this? From my
> understanding, these are generally used to gracefully shutdown containers
> when a pod is deleted and the hook handler is guaranteed to run. It seems
> like most people use them in scenarios where they are shutting things down
> themselves.
>
> Will the hooks also run when a node unexpectedly crashes? If not, is there
> a kubernetes solution for what I'm trying to accomplish?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-users+unsubscr...@googlegroups.com.
> To post to this group, send email to kubernetes-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/kubernetes-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to