PID 1, SIG Handling, Hooks & Probes: Managing Container Lifecycle Correctly - Anmol Krishan Sachdeva
Channel: CNCF [Cloud Native Computing Foundation]
Date: 2020-12-04

Don’t miss out! Join us at our upcoming event: KubeCon + CloudNativeCon Europe 2021 Virtual from May 4–7, 2021. Learn more at https://kubecon.io. The conference features presentations from developers and end users of Kubernetes, Prometheus, Envoy, and all of the other CNCF-hosted projects.

PID 1, SIG Handling, Hooks & Probes: Managing Container Lifecycle Correctly - Anmol Krishan Sachdeva, OLX Group, Naspers 
 
The lifecycle of an application should be tightly linked to the container hosting it. In an environment like Kubernetes where the Pods get created and deleted left, right, and centre, if an application hasn't implemented signal handling correctly, ungraceful termination of that application is most likely to happen and it could lead to disrupted services. For running the containers in a reliable fashion with proper signal handling and lifecycle management, there are a few strategies that should be followed which this talk would be covering: ~ Signal handling through `init` system - covers PID 1, orphans and zombie processes, Linux signals, `dumb-init` or `tini`. ~ Utilizing postStart and preStop lifecycle hooks for initialization and graceful termination. ~ Liveness, Readiness, and Startup probes. ~ Key differences between the postStart hook, initContainer, and Startup Probe. 

https://sched.co/ekAC