---
name: php186-skill-79493
description: "使用原生API支持的工具，将Kubernetes和OpenShift集群操作暴露给MCP客户端，支持资源、Pod、事件、Helm、Tekton和诊断等功能。"
---

# 通过MCP操作Kubernetes和OpenShift集群

## 通过MCP操作Kubernetes和OpenShift集群

 

Expose Kubernetes and OpenShift cluster operations to MCP clients with native API-backed tools for resources, pods, events, Helm, Tekton, and diagnostics.

 

## Prerequisites

 

Access to a Kubernetes or OpenShift cluster, kubeconfig or in-cluster configuration, MCP-compatible client, optional npm, Python, Docker, or native binary install path

 

## Installation

 

Use the upstream install or setup path that matches your environment:

 

- npx kubernetes-mcp-server@latest --help
- make build
- npx @modelcontextprotocol/inspector@latest $(pwd)/kubernetes-mcp-server

 

Requirements and caveats from upstream:

 

- If you're using the native binaries you don't need to have Node or Python installed on your system.
- **✅ Cross-Platform**: Available as a native binary for Linux, macOS, and Windows, as well as an npm package, a Python package, and container/Docker image.
- ## Run the Kubernetes MCP server using npx (in case you have npm and node installed)

 

Basic usage or getting-started notes:

 

- ✨ Features | 🚀 Getting Started | 🎥 Demos | ⚙️ Configuration | 🛠️ Tools | 💬 Community | \[🧑‍💻 Development\](#develo...
- **Top** gets resource usage metrics for all pods or a specific pod in the specified namespace.
- **Exec** into a pod and run a command.
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/containers/kubernetes-mcp-server/HEAD/README.md

 

## Documentation

 

- https://github.com/1991513ccie-png/skills
