Kubernetes
Practical
By Samson Tanimawo, PhD
Published Nov 26, 2025
4 min read
Graceful Shutdown for Pods
Pods can shut down gracefully. The pattern.
Live workflow · 3 working · 1 queuedLive
Signal · gather Working
Decide · pick action Working
Apply · with verify Working
Learn · update playbook Queued
preStop hook
Runs before SIGTERM. Drain connections, save state.
Up to terminationGracePeriodSeconds.
Signal handling
App handles SIGTERM. Closes listeners; finishes in-flight.
30s default; tune by app.
Test
Kill pods; verify no in-flight requests dropped.
Real test under load.