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 ?
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 ?
请检查终结者。
它们在被终止之前完全被调用。
示例: https ://book.kubebuilder.io/reference/using-finalizers.html?highlight=finalizers#using-finalizers