
reza-gholizade/k8s-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
reza-gholizade/k8s-mcp-server는 [[T0]에서 가져온 MCP 서버 후보입니다.
개요
reza-gholizade/k8s-mcp-server는 [[T0]에서 가져온 MCP 서버 후보입니다.
개요(AI 번역)
표준화된 인터페이스를 통해 쿠버네티스 클러스터와 상호작용할 수 있는 도구를 제공하는 쿠버네티스 모델 컨텍스트 프로토콜(MCP) 서버입니다.
호스팅 배포
Fronteir AI에서 호스팅 배포가 가능합니다.
특징
- API 리소스 탐색: Kubernetes 클러스터에서 모든 사용 가능한 API 리소스를 확보하세요.
- 자원 목록: 선택적 네임스페이스와 라벨 필터링이 있는 모든 유형의 자원을 나열합니다.
- 리소스 세부사항: 특정 Kubernetes 리소스에 대한 상세 정보를 얻을 수 있습니다.
- 리소스 설명:
kubectl describe와 유사한 쿠버네티스 리소스에 대한 포괄적인 설명을 얻을 수 있습니다. - 포드 로그: 특정 포드에서 로그를 조회할 수 있습니다(선택적으로 특정 컨테이너에서, 또는 지정되지 않은 경우 모든 컨테이너에서).
- 노드 메트릭: 특정 노드의 리소스 사용 지표를 얻습니다.
- 포드 메트릭: 특정 포드의 CPU 및 메모리 메트릭을 얻습니다.
- 이벤트 목록: 네임스페이스 내나 특정 리소스에 대한 이벤트를 나열합니다.
- 리소스 생성/업데이트: 새로운 Kubernetes 리소스를 생성하거나 YAML 또는 JSON 매니페스트에서 기존 리소스를 업데이트합니다.
- 자원 삭제: 제공된 네임스페이스와 종류를 기반으로 쿠버네티스 클러스터 내 자원을 삭제합니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Kubernetes MCP Server
A Kubernetes Model Context Protocol (MCP) server that provides tools for interacting with Kubernetes clusters through a standardized interface.
Hosted deployment
A hosted deployment is available on Fronteir AI.
Features
- API Resource Discovery: Get all available API resources in your Kubernetes cluster.
- Resource Listing: List resources of any type with optional namespace and label filtering.
- Resource Details: Get detailed information about specific Kubernetes resources.
- Resource Description: Get comprehensive descriptions of Kubernetes resources, similar to
kubectl describe. - Pod Logs: Retrieve logs from specific pods (optionally from a specific container, or all containers if unspecified).
- Node Metrics: Get resource usage metrics for specific nodes.
- Pod Metrics: Get CPU and Memory metrics for specific pods.
- Event Listing: List events within a namespace or for a specific resource.
- Resource Creation/Updating: Create new Kubernetes resources or update existing ones from a YAML or JSON manifest.
- Resource Deletion: It deletes a resource in the Kubernetes cluster based on the provided namespace and kind.
- Standardized Interface: Uses the MCP protocol for consistent tool interaction.
- Flexible Configuration: Supports different Kubernetes contexts and resource scopes.
- Multiple Modes: Run in
stdiomode for CLI tools,ssemode, orstreamable-httpmode for web applications, and--readonlyfor no change in the cluster. - Security: Runs as non-root user in Docker containers for enhanced security.
Prerequisites
- Go 1.23 or later
- Access to a Kubernetes cluster
kubectlconfigured with appropriate cluster access
Installation
-
Clone the repository:
git clone https://github.com/reza-gholizade/k8s-mcp-server.git cd k8s-mcp-server -
Install dependencies:
go mod download -
Build the server:
go build -o k8s-mcp-server .
Usage
Starting the Server
The server can run in three modes, configurable via command-line flags or environment variables.
Stdio Mode (for CLI integrations)
This mode uses standard input/output for communication.
./k8s-mcp-server --mode stdio
Or using environment variables:
SERVER_MODE=stdio ./k8s-mcp-server
SSE Mode (for web applications)
This mode starts an HTTP server with Server-Sent Events support.
HTTP transports require a bearer token and listen on loopback by default:
MCP_AUTH_TOKEN="$(openssl rand -hex 32)" ./k8s-mcp-server --mode sse
Specify a port:
MCP_AUTH_TOKEN="your-random-secret" ./k8s-mcp-server --mode sse --port 9090
Or using environment variables:
SERVER_MODE=sse SERVER_PORT=9090 MCP_AUTH_TOKEN="your-random-secret" ./k8s-mcp-server
설치
docker run -p 8080:8080 -v ~/.kube/config:/home/appuser/.kube/config:ro ginnux/k8s-mcp-server:latest