# Measured what happens to UDP flows when Kubernetes terminates a pod — relevant if you run LiveKit on k8s

**URL:** <https://community.livekit.io/t/measured-what-happens-to-udp-flows-when-kubernetes-terminates-a-pod-relevant-if-you-run-livekit-on-k8s/2111>\
**Category:** Self Hosting\
**Tags:** go, kubernetes, livekit-cloud\
**Created:** [September 23, 2026, 5:11pm UTC](https://community.livekit.io/t/measured-what-happens-to-udp-flows-when-kubernetes-terminates-a-pod-relevant-if-you-run-livekit-on-k8s/2111 "2026-09-23T17:11:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jay\_Nirmal](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/jay_nirmal/32/2593_2.png) [@Jay\_Nirmal](https://community.livekit.io/u/Jay_Nirmal)\
**Post date:** [September 23, 2026, 5:11pm UTC](https://community.livekit.io/t/measured-what-happens-to-udp-flows-when-kubernetes-terminates-a-pod-relevant-if-you-run-livekit-on-k8s/2111/1 "2026-09-23T17:11:23Z")

</div>

I built a small Go tool and ran 25 controlled pod-termination trials. One result is worth flagging for anyone running media servers on Kubernetes: UDP flows were silently re-homed to the replacement pod 2.4 seconds after the delete. In contrast, the original pod was still healthy and had ~23 seconds left in its grace period. TCP connections on the same pod, same Service, same delete were served through the full drain window and closed cleanly.

The graceful-shutdown handler drained the control plane and abandoned the data plane. There’s also a median 221 ms window where the Service still advertised an endpoint whose process had already reset every connection it held.

Write-up: [https://hackernoon.com/your-pods-are-not-draining-i-checked](https://hackernoon.com/your-pods-are-not-draining-i-checked)  
Tool and raw trial records: [https://github.com/jaynirmal15/drainwatch](https://github.com/jaynirmal15/drainwatch)

If anyone has measured this against a cloud LB (NLB/ALB) rather than kind, I’d like to compare — that’s the next thing I’m instrumenting.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/system/32/26_2.png) [@system](https://community.livekit.io/u/system)\
**Post date:** [October 8, 2026, 5:12pm UTC](https://community.livekit.io/t/measured-what-happens-to-udp-flows-when-kubernetes-terminates-a-pod-relevant-if-you-run-livekit-on-k8s/2111/2 "2026-10-08T17:12:08Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
