
Achetronic/Kubernetes-MCP 是从 https://github.com/achetronic/kubernetes-mcp. 导入的 MCP 服务器候选
概览
Achetronic/Kubernetes-MCP 是从 https://github.com/achetronic/kubernetes-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
为什么选择Kubernetes MCP?
AI助手很强大,但它们在Kubernetes上遇到困难,原因如下:
- 上下文窗口限制:单个
kubectl get pods -A就可能超出你的令牌预算 - 安全顾虑:你不希望AI删除你的生产数据库
- 多集群复杂性:集群间跳转易出错
特色
🎯 25 个 Kubernetes 工具
通过自然语言进行完整的集群管理:
| 分类 | 工具 |
|---|---|
| 阅读 | get_resource, list_resources, describe_resource |
| 修改 | apply_manifest, patch_resource, delete_resource, delete_resources |
| 规模与展开 | scale_resource、get_rollout_status、restart_rollout、undo_rollout |
| 调试 | get_logs, exec_command, list_events |
| 集群信息 | get_cluster_info, list_api_resources, list_api_versions, list_namespaces |
| 背景 | get_current_context, list_contexts, switch_context |
| RBAC与指标 | check_permission, get_pod_metrics, get_node_metrics |
| 差异 | diff_manifest |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Why Kubernetes MCP?
AI assistants are powerful, but they struggle with Kubernetes because:
- Context window limits: A single
kubectl get pods -Acan blow your token budget - Security concerns: You don’t want AI deleting your production database
- Multi-cluster complexity: Jumping between clusters is error-prone
Features
Full cluster management through natural language:
| Category | Tools |
|---|---|
| Read | get_resource, list_resources, describe_resource |
| Modify | apply_manifest, patch_resource, delete_resource, delete_resources |
| Scale & Rollout | scale_resource, get_rollout_status, restart_rollout, undo_rollout |
| Debug | get_logs, exec_command, list_events |
| Cluster Info | get_cluster_info, list_api_resources, list_api_versions, list_namespaces |
| Context | get_current_context, list_contexts, switch_context |
| RBAC & Metrics | check_permission, get_pod_metrics, get_node_metrics |
| Diff | diff_manifest |
All resource-addressing tools take GVR parameters: group + version + resource (plural lowercase form, e.g. pods, deployments, ingresses, storageclasses). NOT the Kind. The two manifest tools (apply_manifest, diff_manifest) parse apiVersion/kind from the YAML and resolve the GVR via the cluster’s discovery API, so CRDs and irregular plurals work transparently.
Built-in safety rails:
apply_manifestrejects multi-document YAML and reportscreatedvsupdated.
安装
docker run -d \配置
{
"mcpServers": {
"kubernetes": {
"command": "/path/to/kubernetes-mcp",
"args": ["--config", "/path/to/config.yaml"]
}
}
}