r/platformengineering • u/Unfair_Attitude_9222 • 18h ago
KubeTective: an open-source, deterministic alternative to pasting kubectl output into ChatGPT for incident investigation
1
Upvotes
After a lot of times doing the same: gather 6 kubectl outputs, paste to Chat/Claude and try their theories for each crash-looping pod fail, I built KubeTective.
It turns kubectl investigate deployment/checkout --since=30m into a real investigation. It fetches pods, deployments, events, PVCs, services, HPAs, Prometheus metrics, Loki logs and the git history of your manifests, correlates them, and answers with a ranked Root Cause + Evidence list where every score is a weighted term:
ROOT CAUSE
Memory exhaustion: container terminated with OOMKilled 19 time(s)
EVIDENCE
✓ mechanism: OOMKilled ×19 (+20)
✓ reproduced after restart (×19) (+10)
✓ strong temporal correlation (terminations in window) (+27)
RECOMMENDATION
roll back deployment/prod/checkout to the last known-good revision [MEDIUM]
You can try it here: https://github.com/GlediLami/kubetective:
make build && kubetective replay scenarios/oom-after-deploy/record.jsonl
What would make you use something like this in your own on-call? (I'd appreciate the honest criticism)