MCP Server for Kubernetes - Cluster management, deployments, troubleshooting
npm install @plugix/mcp-kubernetesMCP Server for Kubernetes cluster management with AI assistance.
- Cluster Overview: List pods, deployments, services, namespaces
- Troubleshooting: View pod logs, cluster events, describe resources
- Operations: Scale deployments, trigger rolling restarts
- Cluster Info: Node status, Kubernetes version
``bash`
npm install -g @plugix/mcp-kubernetes
Or run directly:
`bash`
npx @plugix/mcp-kubernetes
Create a .env file or set environment variables:
`bashRequired
API_TOKEN=sk_live_your_token_here
Usage
`bash
Start the MCP server
mcp-kubernetesOr with environment variables
API_TOKEN=sk_live_xxx mcp-kubernetes
`Available Tools
| Tool | Description |
|------|-------------|
|
get_pods | List pods with status, restarts, age |
| get_deployments | List deployments with replica status |
| get_services | List services with IPs and ports |
| get_namespaces | List all namespaces |
| get_pod_logs | Get logs from a specific pod |
| describe_resource | Get detailed resource information |
| get_events | Get cluster events for troubleshooting |
| get_cluster_info | Get nodes and version info |
| scale_deployment | Scale deployment replicas |
| restart_deployment | Trigger rolling restart |Example Prompts
- "Show me all pods in the production namespace"
- "What deployments have unhealthy replicas?"
- "Get the last 50 lines of logs from pod nginx-abc123"
- "Scale the api deployment to 5 replicas"
- "What events occurred in the last hour?"
Security
- Uses local kubeconfig (
~/.kube/config`)MIT