Kubernetes Pod CrashLoop Alert
Detect K8s pod crashes; fetch last 50 logs; LLM diagnoses (app error, OOMKilled, liveness probe, etc.) and suggests recovery steps — escalate to #k8s-alerts.
Overview
**What it does**: Webhook (Kubernetes event: pod.status.reason=CrashLoopBackOff) → fetch pod logs from K8s API (last 50 lines) → LLM diagnoses: app segfault/exception, memory limit hit (OOMKilled), liveness probe timeout, readiness check fail → suggests recovery (increase CPU/mem, fix bug, adjust probe, check config) → Slack to #k8s-alerts with pod name, namespace, diagnosis. **Setup (5 steps)**: 1. Configure K8s event routing: set up Prometheus AlertManager or custom event webhook → point to n8n 2. Add K8s API credentials: service account token with pod log read permission 3. Configure Slack channel: #k8s-alerts 4. Set pod filters: namespaces/labels to monitor (e.g., exclude dev, test) 5. Test: force a pod crash; verify diagnosis appears in Slack within 30 seconds **Apps/nodes**: Webhook (K8s event), HTTP request (K8s API logs), OpenAI (diagnosis), Slack, IF branching. **Credentials required**: K8s cluster API access (service account token), OpenAI account, Slack workspace. **Difficulty**: Medium | **Setup time**: 10 minutes. **Business outcome**: Pod crashes diagnosed in seconds (not minutes of "why won't it start?") → MTTR ↓ 70%, oncall stress ↓ (diagnosis is instant), application stability ↑.
What's included
Quickstart
- 01
Download the JSON
With an active Library Pass, download the workflow file right from this page or your dashboard.
- 02
Import into n8n
Choose Import from File and select the downloaded JSON. The full agent graph appears, ready to configure.
- 03
Plug in credentials
Each integration node prompts for credentials on first run. The setup guide lists every credential the agent expects.
- 04
Activate and test
Run once with sample input, confirm the expected output, then flip the activate toggle.
Frequently Asked Questions
How do I import this workflow into n8n?
What credentials do I need to provide?
Are the credentials included in the JSON file?
Can I edit or customize the workflow after importing?
What n8n version is required?
What if something breaks after I import it?
Can I use this workflow for my customers or business?
Will the workflow receive updates?
Do I need n8n Pro or a paid plan?
Can I ask for a custom workflow?
Reviews (0)
No reviews yet. Be the first.
Sign in to leave a review.
Included with any pass
This agent — and every other in the library — comes with a Library Pass. One pass, the whole catalog.
Get a Library Pass- Every agent in the library
- All new releases while active
- Unlimited downloads
- Commercial-use license
- Priority email support
- 30-day money-back guarantee
More in Incident Response
Deployment Rollback Alert
On critical service deployment failure: LLM assesses blast radius and rollback safety, notifies on-call with rollback recommendation (auto or manual).
Event Correlation & Root Cause Finder
On incident: correlate events from the past hour, identify the first event in the chain, LLM forensics the root cause and proposes remediation.
On-Call Handoff Summary
Daily at shift change: auto-generate handoff summary (current on-call, incoming on-call, active incidents, recent alerts, watch-items) — posted to #oncall-handoff.