How the OOM-Killer Deleted My Namespace, and Other Kubernetes Tales
summary
Datadog runs dozens of clusters (some ~4,000 nodes) and shares three root-cause stories: a refactored Helm chart moved the Namespace out of the release so helm upgrade removes resources and a metrics-server APIService discovery failure (caused by a certificate reload/feature-gate mismatch) leaves the namespace controller unable to delete contents for four days; a CNI ptp delete hangs due to a netlink syscall bug triggered by a kernel jump (Ubuntu moved from 4.15 to 5.4) so netlink bug on kernel 4.20 blocks kubelet and container runtime checks; and a newly deployed node-group controller issued massive parallel lists that hit etcd because lists bypass cache (resourceVersion unset), accumulating ~2 days of query time and overloading kube-apiserver.
AI-written summary · about
chapters (33)
- 0:00Intro
- 0:35Datadog
- 1:55Symptoms
- 2:14Investigation
- 2:51Deletion call, 4d before Audit logs for the namespace
- 3:45Spinnaker deploys (v1)
- 4:17Helm 3 deploys (v2)
- 4:33Big difference
- 5:12What happened?
- 6:47Namespace Controller logs Virtual
- 8:10Events so far
- 8:59Metrics-server setup
- 9:41Metrics-server deployment
- 10:27Full chain of events
- 10:55Key take-away Apiservice extensions are great but can impact your cluster
- 12:00Context
- 12:49Runtime is down?
- 14:10CNI status
- 14:49Containerd goroutine dump Blocked goroutines?
- 15:27Seems CNI related
- 15:58What about Delete?
- 16:23CNI plugin
- 17:05The root cause
- 19:19What we know
- 19:38Apiserver requests
- 22:13Illustration
- 23:01What about label filters?
- 24:01Informers instead of List How do informers work?
- 26:14Back to the incident
- 27:25Nodegroup controller?
- 28:12How did it work?
- 29:07What we learned
- 29:46Conclusion
related talks
21mHow to Not Destroy Your Production Kubernetes Clusters
36m101 Ways to “Break and Recover” Kubernetes Cluster
34mReading 100+ Kubernetes Post-Mortems - lessons learned
31mGhosts in the Runtime: Who Ate My Capabilities & Other Mysteries
30mWhat we learned from reading 100+ Kubernetes Post-Mortems
37m10 Ways to Shoot Yourself in the Foot with Kubernetes, #9 Will Surprise You
35mKubernetes, Lessons Learnt
41mKubernetes the Very Hard Way
