Skip to main content

Monitor Kubernetes services & pods with Prometheus and send alerts to Slack

Workflow preview

Workflow preview
100%
Monitor Kubernetes services & pods with Prometheus and send alerts to Slack preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Short Summary Proactively alert to service endpoint changes and pod/container issues (Pending, Not Ready, Restart spikes) using Prometheus metrics, formatted and sent to Slack. ️ Category DevO...

Best for

  • DevOps automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.stickynote, n8n-nodes-base.merge

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by John Pranay Kumar Reddy.

Original n8n.io source

1.1 Workflow description

Title
Monitor Kubernetes services & pods with Prometheus and send alerts to Slack
Workflow name
Monitor Kubernetes services & pods with Prometheus and send alerts to Slack
🧩 Short Summary

Proactively alert to service endpoint changes and pod/container issues (Pending, Not Ready, Restart spikes) using Prometheus metrics, formatted and sent to Slack.

🗂️ Category

DevOps / Monitoring & Observability

🏷️ Tags

kubernetes, prometheus, slack, alerting, sre, ops, kube-state-metrics

✅ Prerequisites
  • Prometheus scraping kube-state-metrics v2.x.
  • Slack App or Incoming Webhook (channel access).
  • n8n instance with outbound access to Prometheus & Slack.
🔑 Required Credentials in n8n

Slack: Bot OAuth (chat:write) or Incoming Webhook URL.

(Optional) Prometheus Basic Auth (if your Prometheus needs it).

🧠 What This Template Does
  • Detects pods stuck in Pending (scheduling problems like taints/affinity/capacity).
  • Detects containers Not Ready (readiness probe failures).
  • Detects container restart spikes over a sliding window (default 5 minutes).
  • Detects service discovery changes (endpoint count diffs current vs previous snapshot).
  • Sends clean, emoji-enhanced Slack alerts with pod/namespace/service context.
  • Outputs a 5-minute summary block to reduce noise.
📣 Slack Message Style (examples)

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - 🕒 Every 5 Min Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 2 - 📤 Send Alerts to Slack

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - CrashLoopBackOff / Termination Reason

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Pod Restart Spike (last 5m)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Normalization

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Slack formatter with summary

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Pods Running State

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Map Prometheus results into namespace/service

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Map Prometheus results into namespace/service1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Normalization Node

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Merge (endpoints)

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 18 - Current endpoints

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 19 - Endpoints 5m ago

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 20 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note10

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 32 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Monitor Kubernetes services & pods with Prometheus and send alerts to Slack
Complexity advanced
Nodes 32
Categories DevOps, Multimodal AI
Author John Pranay Kumar Reddy
Published 20 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7665/7665.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Monitor Kubernetes services & pods with Prometheus and send alerts to Slack do?

Short Summary Proactively alert to service endpoint changes and pod/container issues (Pending, Not Ready, Restart spikes) using Prometheus metrics, formatted and sent to Slack. ️ Category DevO...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps, Multimodal AI use case.