- Home
- Skills
- DevOps & Cloud
- Kubernetes k8s mcp server
Kubernetes k8s mcp server
Investigate, debug, and manage Kubernetes workloads using k8s-mcp-server tools.
Free
Works with the AI Agents you already use
Kubernetes k8s mcp server
Example session with this skill installed
My pod 'api-gateway' in the 'prod' namespace is crashing. Find out why and fix it if it's a simple config issue.
- Read your context and instructions
- Compiled the kubernetes k8s mcp
I investigated the api-gateway pod in the prod namespace. The pod is in a CrashLoopBackOff state because the DB_URL environment variable is pointing to a non-existent Service.
Diagnostic Summary
| Component | Status | Detail |
|---|---|---|
| Pod Status | Waiting | CrashLoopBackOff (Exit Code 1) |
| Last Event | BackOff | Back-off restarting failed container |
| Log Tail | Error | FATAL: could not resolve host "db-service-legacy.prod.svc.cluster.local" |
| Service | Missing | db-service-legacy does not exist in namespace prod |
| Active Service | Found | db-service-v2 is available and has active endpoints |
I have patched the deployment to use the correct service endpoint.
# Patch applied to deployment/api-gateway
spec:
template:
spec:
containers:
- name: gateway
env:
- name: DB_URL
value: "db-service-v2.prod.svc.cluster.local"
I verified the fix by monitoring the rollout. The new replica set is fully functional and the pod has transitioned to Running status.
Next steps
- Monitor
rollout_statusfor the next 5 minutes to ensure stability. - Decommission the old configuration reference in your CI/CD pipeline variables.
- Check if other microservices are still referencing the legacy database service.
Connects securely to your tools. The creator never sees your data.
About this skill
Kubernetes cluster management is often hindered by context-switching between tools and manual investigation of fragmented logs and events. This skill integrates directly with your agent to diagnose and resolve cluster issues using the k8s-mcp-server.
What it does
- Cluster Diagnostics: Analyzes pods and nodes to find root causes for
CrashLoopBackOff,Pending, orOOMKilledstates. - Workload Management: Handles scaling, patching, rolling back, and restarting deployments or statefulsets.
- Network Troubleshooting: Checks services, endpoints, ingress configurations, and DNS resolution.
- Resource Monitoring: Tracks node pressure, pod resource usage, and metrics-server data.
- In-cluster Debugging: Executes commands in containers, adds ephemeral debug containers, and manages port-forwards.
- Server Orchestration: Manages the installation and configuration of the MCP server, including namespace restrictions and permission flags.
How it works
- Health Check: Runs
cluster_healthto verify API reachability and node readiness before starting tasks. - Investigation: Uses
diagnose_podordiagnose_nodeto aggregate status, events, and log tails for rapid triage. - Change Proposal: Describes the impact of writes or destructive actions, performing a
dry_runwhere supported. - Execution & Verification: Applies the fix and monitors
rollout_statusor pod phases to ensure the desired state is reached.
Frameworks & tools
Uses the Model Context Protocol (MCP) to interface with any Kubernetes cluster via kubectl configuration. Works with Claude Code, Cursor, and other MCP-compatible environments.
Why this beats prompting it yourself
Generic prompts often fail to handle namespace scoping or large result sets, leading to "context window exceeded" errors. This skill implements specific paging logic and diagnostic playbooks that prioritize the most relevant telemetry first.
Use cases
- Debugging a 503 error by checking service endpoints and ingress status.
- Recovering a failing deployment by analyzing previous logs and triggering a rollback.
- Freeing up node resources by identifying high-usage pods and cordoning nodes.
- Setting up an MCP server with specific write permissions for a dev namespace.
Known limitations
Operations are limited by the flags (--allow-writes, --allow-debug) set on the MCP server. Connectivity checks from a local server process may not reflect internal cluster DNS.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean today
- Free to download with an account
Requires