Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
SkillCẩn thậnDeploy & vận hànhNâng cao

kubectl-mcp-server

rohitg00 · rohitg00/kubectl-mcp-server

Một MCP server cho phép các AI agent kiểm soát và quản lý hạ tầng Kubernetes thông qua các cuộc trò chuyện bằng ngôn ngữ tự nhiên.

Được xuất bản trong CNCF Landscape: Một MCP server cho Kubernetes.

962 sao185Giấy phép: MITCập nhật 6 tháng trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Gỡ lỗi các pod Kubernetes bị crash bằng cách hỏi AI agent.
  • Triển khai ứng dụng mới lên các cụm Kubernetes thông qua lệnh ngôn ngữ tự nhiên.
  • Tối ưu hóa chi phí Kubernetes và kiểm tra cài đặt bảo mật với sự hỗ trợ của AI.

Kiểm tra an toàn

Cẩn thận

Dùng được, nhưng nên đọc ghi chú trước.

  • ●Gói npm tự chạy script khi cài đặt.package.json
  • ●Trình cài đặt tải script từ xa và chạy thẳng bằng shell.README.md

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

kubectl-mcp-server

Control your entire Kubernetes infrastructure through natural language conversations with AI. Talk to your clusters like you talk to a DevOps expert. Debug crashed pods, optimize costs, deploy applications, audit security, manage Helm charts, and visualize dashboards, all through natural language. Part of CNCF Landscape, Next to Terraform


Installation

Quick Start with npx (Recommended - Zero Install)

# Run directly without installation - works instantly!
npx -y kubectl-mcp-server

# Or install globally for faster startup
npm install -g kubectl-mcp-server

Or install with pip (Python)

# Standard installation
pip install kubectl-mcp-server

# With interactive UI dashboards (recommended)
pip install kubectl-mcp-server[ui]

📑 Table of Contents


What Can You Do?

Simply ask your AI assistant in natural language:

💬 "Why is my pod crashing?"

  • Instant crash diagnosis with logs, events, and resource analysis
  • Root cause identification with actionable recommendations

💬 "Deploy a Redis cluster with 3 replicas"

  • Creates deployment with best practices
  • Configures services, persistent storage, and health checks

💬 "Show me which pods are wasting resources"

  • AI-powered cost optimization analysis
  • Resource recommendations with potential savings

💬 "Which services can't reach the database?"

  • Network connectivity diagnostics with DNS resolution
  • Service chain tracing from ingress to pods

💬 "Audit security across all namespaces"

  • RBAC permission analysis
  • Secret security scanning and pod security policies

💬 "Show me the cluster dashboard"

  • Interactive HTML dashboards with live metrics
  • Visual timeline of events and resource usage

253 powerful tools | 8 workflow prompts | 8 data resources | Works with all major AI assistants

Why kubectl-mcp-server?

  • 🚀 Stop context-switching - Manage Kubernetes directly from your AI assistant conversations
  • 🧠 AI-powered diagnostics - Get intelligent troubleshooting, not just raw data
  • 💰 Built-in cost optimization - Identify waste and get actionable savings recommendations
  • 🔒 Enterprise-ready - OAuth 2.1 auth, RBAC validation, non-destructive mode, secret masking
  • ⚡ Zero learning curve - Natural language instead of memorizing kubectl commands
  • 🌐 Universal compatibility - Works with Claude, Cursor, Windsurf, Copilot, and 15+ other AI tools
  • 📊 Visual insights - Interactive dashboards and browser automation for web-based tools
  • ☸️ Production-grade - Deploy in-cluster with kMCP, 216 passing tests, active maintenance

From debugging crashed pods to optimizing cluster costs, kubectl-mcp-server is your AI-powered DevOps companion.

Live Demos

Claude Desktop

Cursor AI

Windsurf

Installation

Quick Start with npx (Recommended - Zero Install)

# Run directly without installation - works instantly!
npx -y kubectl-mcp-server

# Or install globally for faster startup
npm install -g kubectl-mcp-server

Or install with pip (Python)

# Standard installation
pip install kubectl-mcp-server

# With interactive UI dashboards (recommended)
pip install kubectl-mcp-server[ui]

Install from GitHub Release

# Install specific version directly from GitHub release (replace {VERSION} with desired version)
pip install https://github.com/rohitg00/kubectl-mcp-server/releases/download/v{VERSION}/kubectl_mcp_server-{VERSION}-py3-none-any.whl

# Example: Install v1.19.0
pip install https://github.com/rohitg00/kubectl-mcp-server/releases/download/v1.19.0/kubectl_mcp_server-1.19.0-py3-none-any.whl

# Or install latest from git
pip install git+https://github.com/rohitg00/kubectl-mcp-server.git

Prerequisites

  • Python 3.9+ (for pip installation)
  • Node.js 14+ (for npx installation)
  • kubectl installed and configured
  • Access to a Kubernetes cluster

Docker

# Pull from Docker Hub
docker pull rohitghumare64/kubectl-mcp-server:latest

# Or pull from GitHub Container Registry
docker pull ghcr.io/rohitg00/kubectl-mcp-server:latest

# Run with stdio transport
docker run -i -v $HOME/.kube:/root/.kube:ro rohitghumare64/kubectl-mcp-server:latest

# Run with HTTP transport
docker run -p 8000:8000 -v $HOME/.kube:/root/.kube:ro rohitghumare64/kubectl-mcp-server:latest --transport sse

Getting Started

1. Test the Server (Optional)

Before integrating with your AI assistant, verify the installation:

# Check if kubectl is configured
kubectl cluster-info

# Test the MCP server directly
kubectl-mcp-server info

# 
Xem mã nguồn trên GitHub