
OpenShift MCP Server - Monitor and manage OpenShift/Kubernetes clusters through AI IDE
概览
A Model Context Protocol (MCP) server for monitoring and managing OpenShift/Kubernetes clusters. This server provides real-time cluster insights through AI assistants, enabling natural language queries about your cluster health, performance, and resource usage. - : Check overall cluster health and identify stability issues - : Retrieve real-time performance metrics for nodes and pods - : Detect pods and nodes with resource allocation problems - : Analyze pod disruptions and restart patterns - : Check node conditions and identify problematic nodes - : Monitor deployment status and rollout health - : Check kubelet, CRI-O status and analyze journalctl logs - : Create deployments with guaranteed QoS and resource management - : Deploy PostgreSQL, MySQL, MongoDB, or Redis with persistent storage - : Set up horizontal pod autoscalers with CPU/memory targets - : Create and configure services (ClusterIP, NodePort, LoadBalancer) - : Create network policies for secure pod-to-pod...
README
以下为原文 README 节选,完整内容请查看原文。
OpenShift MCP Server
A Model Context Protocol (MCP) server for monitoring and managing OpenShift/Kubernetes clusters. This server provides real-time cluster insights through AI assistants, enabling natural language queries about your cluster health, performance, and resource usage.
Features
Core Monitoring Capabilities
- Cluster Health Monitoring: Check overall cluster health and identify stability issues
- Performance Metrics: Retrieve real-time performance metrics for nodes and pods
- Resource Issue Detection: Detect pods and nodes with resource allocation problems
- Pod Disruption Analysis: Analyze pod disruptions and restart patterns
- Node Condition Monitoring: Check node conditions and identify problematic nodes
- Deployment Monitoring: Monitor deployment status and rollout health
- System Diagnostics: Check kubelet, CRI-O status and analyze journalctl logs
Deployment & Configuration Management
- Application Deployment: Create deployments with guaranteed QoS and resource management
- Database Services: Deploy PostgreSQL, MySQL, MongoDB, or Redis with persistent storage
- Auto-scaling: Set up horizontal pod autoscalers with CPU/memory targets
- Service Management: Create and configure services (ClusterIP, NodePort, LoadBalancer)
- Network Security: Create network policies for secure pod-to-pod communication
Performance Testing & Benchmarking
- Cluster Performance: Execute kube-burner density testing for application deployment performance
- Storage Benchmarks: Run FIO workloads for sequential/random read/write performance testing
- Network Testing: Test network throughput, latency, and packet loss with iperf3
- Resource Stress Testing: Perform CPU and memory stress testing on worker nodes
- Database Benchmarking: Execute PostgreSQL (pgbench) or MySQL (sysbench) performance tests
Remote Execution Capabilities for Advanced Performance Testing and Benchmarking
- Bastion Host Support: Execute tests on private clusters through jump hosts
- SSH Integration: Secure remote command execution with credential management
- Multi-Cluster Testing: Test across different OpenShift environments
- Automated Benchmarking: Schedule and run performance tests through AI assistants
- Remote Execution: Execute performance benchmarks and tools on remote clusters through bastion hosts
- Multi-Cluster Support: Manage and test across different OpenShift environments
Prerequisites
- Node.js 18+
- Access to an OpenShift/Kubernetes cluster
- Valid kubeconfig file or in-cluster configuration
- SSH access to bastion hosts (for remote deployments)
Bastion Host Setup
For remote cluster access through bastion hosts, follow these two setup phases:
Phase 1: Authentication Setup
For remote cluster access through bastion hosts, you can use either SSH key (recommended) or password authentication:
Option 1: SSH Key Authentication (Recommended)
安装
docker run -v ~/.kube/config:/root/.kube/config openshift-mcp-server配置
{
"mcpServers": {
"openshift-mcp-server": {
"command": "node",
"args": ["/path/to/openshift-mcp-server/remote-launcher.js"],
"env": {
"MCP_BASTION_HOST": "your-bastion-host.com",
"MCP_BASTION_USER": "your-username",
"MCP_SSH_KEY": "/path/to/your/ssh/key",
"MCP_REMOTE_PATH": "/opt/openshift-mcp-server",
"MCP_REMOTE_KUBECONFIG": "/path/to/remote/kubeconfig",
"MCP_REMOTE_NODE_ENV": "production"
},
"cwd": "/path/to/openshift-mcp-server"
}
}
}