I work with Kubernetes, and the box consists of different containers.
I need to apply different types of behavior when two specific events occur:
- the container (for some reason) has problems and needs to be restarted. This occurs when a breakthrough in the field of sensitivity does not work.
- you must stop the container. For example, I am launching a new version, and the tunnels complete the previous one and deploy the new one.
From what I understood in both cases, the kubernetes calls the hook preStopand sends a SIGTERM, so it's impossible for me to figure out which of the two situations I am in. It is right? Am I missing something?
thank
source
share