0

Is there a way to call a function before the Pod is being terminated? preStop hook examples are based on yaml specs.

I want to use the K8s API, should I just write a SIGTERM handler ? What is the "safe" way to do it ?

4

1 回答 1

1

请检查终结者。

它们在被终止之前完全被调用。

示例: https ://book.kubebuilder.io/reference/using-finalizers.html?highlight=finalizers#using-finalizers

于 2020-04-09T08:18:24.157 回答