PID 1, SIG Handling, Hooks & Probes: Managing Container Lifecycle Correctly
Talkat KubeCon + CloudNativeCon North America 2020 Virtual · on Tuesday, 2020-11-17· at 17:40· Intrado Virtual Event Platform,·
summary
Explains that containers need a real init to reap zombies and forward signals, demonstrates tini installed as PID 1 preventing defunct processes, and shows the Kubernetes termination flow with the default 30s grace period. Covers concrete use of liveness/readiness probes with a Flask demo (readiness stops traffic, liveness triggers container restart), contrasts postStart/preStop hooks with initContainers, and gives startup probe guidance (use high failureThresholds like 10–15 for slow startups).
AI-written summary · about
chapters (31)
- 0:00Intro
- 0:39About OLX Group
- 1:08Infrastructure Landscape
- 1:18Agenda
- 2:13Unix Processes
- 4:10Orphans
- 4:40Are Zombies Harmful?
- 4:59Zombies and Containers
- 5:57Init System To The Rescue
- 6:10Tini Init System
- 6:30Setting Up Tini
- 8:46More Details
- 9:46Pod Lifecycle Phases
- 10:25Container Lifecycle States
- 10:53Terminating Gracefully
- 12:06Termination Lifecycle
- 13:31Health Probe Pattern
- 13:47Self-Healing Containers
- 14:14Problems
- 15:13Technicalities of Probes
- 15:47Container Probes
- 16:54Readiness Probe
- 17:39Code Walkthrough
- 24:06Startup Probe
- 24:48Need for Lifecycle Hooks
- 25:14postStart Hook Behaviour
- 25:34preStop Hook
- 26:14Revisiting Termination
- 29:20Usage of Init Containers
- 29:59Scheduling and Resources
- 30:42Face-off
related talks
30mAfterlife tales: Troubleshooting containerized applications
05mLightning Talk: Slow Starting Containers, How to Check Their Health?
26mWait! Can Your Pod Survive a Restart?
45mTroubleshooting containerized applications
26mKubernetes Probes: What are they for and why you should always properly configure them
23mLife of a Container
34mReading 100+ Kubernetes Post-Mortems - lessons learned
37mSelf-Healing Applications with Docker and Kubernetes
