Life cycle hooks are actions triggered on certain events and performed against containers. They work like a single Kubernetes probing action, but they'll be fired at least once per event during a container's lifetime. Currently, two events are supported:
- PostStart: This executes right after a container is created. Since this hook and the entry point of a container are fired asynchronously, there's no guarantee that the hook will be executed before the container starts. As such, we're unlikely to use it to initialize resources for a container.
- PreStop: This executes right before sending SIGTERM to a container. One difference from the PostStart hook is that the PreStop hook is a synchronous call; in other words, ...