K8s Warning Monitor MCP
Provides tools for monitoring Kubernetes cluster warnings and failures, filtering Warning/Failed events for AI-assisted diagnostics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@K8s Warning Monitor MCPCheck for any failing pods in the cluster"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Overview
The K8s Warning Monitor is a purpose-built Model Context Protocol (MCP) server that acts as a targeted diagnostic bridge between your local Kubernetes cluster (like Minikube) and AI coding assistants (like Cline or Roo Code).
Instead of flooding the AI's context window with thousands of normal cluster scheduling events, this tool strictly filters for Warning or Failed events. It parses the data into clean, formatted text, allowing your AI to instantly understand what is currently broken in your environment without wasting tokens.
Related MCP server: k8s-mcp-server
β¨ Features
π― Context-Optimized: Only returns actionable warnings (e.g.,
ImagePullBackOff,CrashLoopBackOff,FailedScheduling).π³ Fully Dockerized: Runs ephemerally as an interactive Docker container.
πͺ Windows 11 & Minikube Friendly: Includes the exact configuration needed to route container traffic back to a Windows host's Minikube cluster via
host.docker.internal.β‘ Automated Lifecycle: The AI spins the container up to execute the tool, communicates via standard streams (
stdio), and the--rmflag cleans it up immediately after.
π οΈ Prerequisites
Before you begin, ensure you have the following installed on your machine:
Docker Desktop (running)
Minikube (or any local/remote Kubernetes cluster)
kubectl configured and authenticated
VS Code with the Cline (or equivalent MCP-compatible) extension
π Setup & Installation
1. Clone the Repository
git clone https://github.com/your-username/k8s-warning-monitor.git
cd k8s-warning-monitor2. Build the Docker Image
Build the lightweight Node.js Alpine container:
docker build -t mcp-k8s-warnings .3. Prepare the Docker-Friendly Kubeconfig
Because Docker containers have their own isolated network loopback, we need to create a flattened kubeconfig that allows the container to talk to your host's Minikube.
Generate the flattened config (embeds certificates directly):
kubectl config view --raw --minify --flatten > kubeconfig-dockerβ οΈ CRITICAL MINIKUBE FIX:
Open kubeconfig-docker in your editor. Locate the server: address (it usually points to https://127.0.0.1:<port>).
Change 127.0.0.1 to host.docker.internal.
Example:
# Change this:
server: https://127.0.0.1:58253
# To this:
server: https://host.docker.internal:582534. Connect to Cline (VS Code)
Open your MCP settings in VS Code (cline_mcp_settings.json) and add the server configuration.
Note: Update the D:\study\... volume path to match your absolute clone directory.
{
"mcpServers": {
"warning-monitor-docker": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"D:\path\to\your\clone\k8s-warning-monitor\kubeconfig-docker:/root/.kube/config:ro",
"mcp-k8s-warnings"
]
}
}
}π€ Usage Examples
Once configured, reload your VS Code window. Open your AI chat interface and try the following prompts:
π£οΈ "Using the warning-monitor-docker tool, get my cluster errors."
π£οΈ "Check if there are any failing pods in the cluster, then suggest a fix for the highest priority warning."
π£οΈ "Run a cluster health check using the warning monitor tool."
π Security & Architecture Note
Is this safe to run? The TypeScript code executing inside this container is strictly read-only. It only utilizes the @kubernetes/client-node API to perform listEventForAllNamespaces() requests. The AI has no programmed capability to modify, delete, or create resources through this specific MCP server.
However, the container itself inherits your privileges.
Because the installation mounts your local, flattened kubeconfig-docker file into the container, the Docker process has the same cluster administrative rights as your local user. For strict enterprise security, you should replace the flattened config with one utilizing a restricted Kubernetes ServiceAccount bound to a ClusterRole that only permits "get, list, watch" verbs.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
- mttrlyOAuthcom.mttrly
AI-powered incident management and server monitoring via MCP.
The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costsβall without needing to parse text output or use complex kubectl commands.
MCP-native AI SRE: ask what's broken in production, get a reviewed GitHub fix PR.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI assistants to interact with Kubernetes clusters by translating natural language into kubectl and Helm operations. It allows users to query, manage, and diagnose Kubernetes resources and cluster states through a seamless integration.20Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets AI assistants safely inspect and operate on Kubernetes clusters through natural conversation.88 PyPIMIT
- FlicenseAqualityDmaintenanceAI-powered MCP server for enterprise OpenShift/Kubernetes cluster management, providing diagnostic tools, RAG knowledge retrieval, and autonomous remediation recommendations.9-
- AlicenseNot gradedqualityBmaintenanceMCP server that connects LLMs to Kubernetes clusters for troubleshooting, scanning failing pods, diagnosing root causes, and applying guarded fixes or generating manifests via natural language.MIT