At three o’clock in the morning, my phone rang. It was a thundering sound, best described as European ambulance . Half-asleep, I groaned, knowing exactly what that sound meant. There was a production incident.
Soon, I was running through my standard (informal) list of ‘production incident’ questions:
How bad is it?
Who does it affect?
… did I cause it? (Shit.)
That particular incident originated from a repeated, critical alert: High memory usage of controller pods . Not good. According to kube-state-metrics and kubectl top , we were on the brink of OOM’ing. Really not good!
It usually takes just a few minutes of digging to track down the source of a memory spike, but this time, a quick look at pprof told me… nothing. The heap was flat at 3 MiB, but Kubernetes showed more than 400 MiB. Evidently, nothing our app was doing would explain the number Kubernetes was so mad about.…