K8s AI Assistant

Provides AI-powered Kubernetes management via an MCP Server with command execution and Rancher UI extensions.
  • typescript

0

GitHub Stars

typescript

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "thanhdeptr-k8s_ai_assistant_mcp": {
      "command": "node",
      "args": [
        "/path/to/K8s_AI_Assistant_MCP/mcp-server-kubernetes/dist/index.js"
      ]
    }
  }
}

You manage Kubernetes with an MCP Server that translates natural language requests into Kubernetes actions. This setup lets you interact via a command-driven interface while also leveraging a Rancher UI extension for visual management, creating a unified, AI-assisted cluster experience.

How to use

Use an MCP client to connect to the MCP Server exposed by your Kuberenetes management setup. You can submit natural language prompts like asking to list pods, describe resources, scale deployments, or diagnose issues. The MCP Server translates your request into Kubernetes operations, executes them, and returns structured results with insights and actionable next steps. Leverage the Rancher UI extensions for real-time dashboards and visual management alongside the command-based workflow.

How to install

Prerequisites you need before installation: a Kubernetes cluster (local or remote), Node.js 18+ and npm, kubectl configured for your cluster access, Rancher Manager for UI extensions, and an AI model host (such as an Ollama server) if you plan to run AI-in-the-loop.

Follow these concrete steps to install and run the MCP server and Rancher UI extensions locally.

# 1. Clone the project
git clone https://github.com/Thanhdeptr/K8s_AI_Assistant_MCP.git
cd K8s_AI_Assistant_MCP

# 2. Install MCP Server
cd mcp-server-kubernetes
npm install
npm run build

# 3. Install Rancher UI Extensions
cd ../rancher-ui
npm install

Configure the MCP command source for local runtime

{
  "mcpServers": {
    "k8s_ai_assistant": {
      "command": "node",
      "args": ["/path/to/K8s_AI_Assistant_MCP/mcp-server-kubernetes/dist/index.js"]
    }
  }
}

Available tools

kubectl_get

Retrieve all pods, services, deployments, or any resource in a namespace using a natural-language driven workflow that maps to kubectl get commands.

kubectl_describe

Describe a specific Kubernetes resource to view its details, status, and events, mapped from natural language prompts.

kubectl_create

Create resources from manifests or definitions, invoked via natural language prompts that map to kubectl create operations.

kubectl_apply

Apply changes to resources using manifests or inline definitions inferred from user queries.

kubectl_delete

Delete resources based on user intent, translating to kubectl delete operations.

kubectl_scale

Scale deployments or stateful sets to desired replica counts as requested by the user.

kubectl_patch

Patch resources to modify configurations without full redeployments.

kubectl_rollout

Manage rollout status and history for deployments and other controllers.

kubectl_logs

Fetch logs for pods to troubleshoot issues as requested by the user.

port_forward

Establish a port-forward session to access services locally from the cluster.

k8s-diagnose

Run AI-assisted diagnostics to identify common Kubernetes issues and recommend fixes.

install_helm_chart

Install Helm charts to deploy applications or services into the cluster.

upgrade_helm_chart

Upgrade existing Helm deployments to newer chart versions.

uninstall_helm_chart

Uninstall Helm charts and clean up associated resources.

kubectl_context

Switch or display the current Kubernetes context to target a different cluster or user.

list_api_resources

List API resources available in the cluster to guide user actions.

explain_resource

Provide explanations for a specific Kubernetes resource type or manifest field.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational