Kubernetes k8s mcp server

    1

    Investigate, debug, and manage Kubernetes workloads using k8s-mcp-server tools.

    Free

    1 useSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    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

    ComponentStatusDetail
    Pod StatusWaitingCrashLoopBackOff (Exit Code 1)
    Last EventBackOffBack-off restarting failed container
    Log TailErrorFATAL: could not resolve host "db-service-legacy.prod.svc.cluster.local"
    ServiceMissingdb-service-legacy does not exist in namespace prod
    Active ServiceFounddb-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_status for 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, or OOMKilled states.
    • 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

    1. Health Check: Runs cluster_health to verify API reachability and node readiness before starting tasks.
    2. Investigation: Uses diagnose_pod or diagnose_node to aggregate status, events, and log tails for rapid triage.
    3. Change Proposal: Describes the impact of writes or destructive actions, performing a dry_run where supported.
    4. Execution & Verification: Applies the fix and monitors rollout_status or 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.

    Requires k8s-mcp-server installation. Writes and exec require specific server flags. Local DNS checks may not match cluster-internal resolution.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 28 days ago

    • Free with an Agensi account

    Requires

    K8s MCP
    macOS
    Go Kubernetes MCP

    Permissions

    Network Access
    Read Files
    Listed28 days ago

    What's inside

    Frequently Asked Questions

    This skill connects to any Kubernetes cluster reachable via your local kubeconfig, including EKS, GKE, AKS, and local environments like Minikube or Kind.

    It is compatible with any Model Context Protocol (MCP) host, such as Claude Code, Cursor, and IDE-based agents that support MCP server integration.

    The skill respects the RBAC permissions of your kubeconfig and is further governed by specific MCP flags, such as --allow-writes, which you can toggle to restrict the agent to read-only or full-write access.

    Unlike generic prompts, this skill uses structured diagnostic playbooks and paging logic to handle large log files and complex resource lists without exceeding your AI's context window.

    You will receive the k8s-mcp-server package, detailed configuration instructions for various MCP hosts, and a set of optimized diagnostic tools for immediate deployment.

    The skill includes built-in server orchestration tools that guide you through setting up the necessary MCP server flags and namespace restrictions during the initial setup phase.

    New in DevOps & Cloud