Predicting Kubernetes failures before they page you
ML system that predicts OOMKill and CrashLoopBackOff up to 30 minutes ahead — calibrated failure probabilities with SHAP explanations, served as an in-cluster gRPC sidecar.
— The hard part isn't the model. It's proving the features don't leak the future.
- ahead of failure
- 30m
- p95 inference
- <50ms
- top-3 features
- SHAP
Kubernetes tells you a pod is failing only once it already has. By the time OOMKill or CrashLoopBackOff fires, the incident is live and the on-call engineer is reacting, not preventing. The signal to see it coming is in the metrics — memory pressure trends, restart cadence, request-latency drift — but nobody's watching it early enough.
Built a forecasting pipeline on pod-level Prometheus metrics: LightGBM for the core classifier, PyTorch for sequence features, Optuna for tuning, SHAP for per-prediction explanations. Strict leakage detection and Great Expectations data checks keep the training set honest. Serving is a BentoML gRPC sidecar tuned for p95 < 50ms, with Evidently drift detection triggering champion/challenger retrains through Prefect. Validated on chaos-mesh synthetic traces and real Alibaba 2018 production data.
A 30-minute horizon trades lead time for confidence — predict too early and precision collapses into alert fatigue; too late and there's no time to act. The decision threshold is the real knob: it's calibrated per-cluster, not hardcoded.
Open source, public on GitHub. Emits calibrated failure probability with the top-3 contributing features, routes to PagerDuty / kubeai-ops for automated response, and retrains itself on drift. Phases 1–5 (data pipeline, features, modeling, serving) code-complete.
Drag the alert threshold. See which pods we page on — and which failures we’d miss.
- Python
- LightGBM
- PyTorch
- BentoML · gRPC
- Prefect
- Prometheus
- Kubernetes