-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Description
Feature Request: Multi-Cluster Operations Support via Open Cluster Management Cluster-Proxy
Problem Statement
The current Kubernetes MCP Server is limited to single-cluster operations, connecting to one Kubernetes cluster at a time based on the kubeconfig context. In enterprise environments with multiple clusters (dev, staging, prod, or geographically distributed clusters), users need to manually switch contexts or run multiple MCP server instances to interact with different clusters.
Proposed Solution
Enhance the MCP server to support multi-cluster operations by leveraging Open Cluster Management (OCM) and its cluster-proxy addon. This would enable the MCP server to:
- Discover and manage multiple clusters registered with Open Cluster Management
- Route operations to specific clusters through the cluster-proxy addon
- Provide unified multi-cluster visibility across all managed clusters
- Support cross-cluster operations like workload migration and comparison
Technical Approach
Core Components
- Cluster Discovery: Integrate with OCM Hub to discover managed clusters
- Cluster Proxy Integration: Use the cluster-proxy addon for secure multi-cluster communication
- Enhanced MCP Tools: Extend existing toolsets (core, config, helm) with cluster-aware operations
- Context Management: Add cluster selection and switching capabilities
Proposed Architecture
┌─────────────────┐ ┌──────────────────────┐ ┌─────────────────┐
│ MCP Client │───▶│ Kubernetes MCP │───▶│ OCM Hub │
│ (Claude) │ │ Server (Enhanced) │ │ Cluster │
└─────────────────┘ └──────────────────────┘ └─────────────────┘
│ │
│ ┌────────▼────────┐
│ │ Cluster Proxy │
│ │ Addon │
│ └────────┬────────┘
│ │
│ ┌─────────────────┼─────────────────┐
│ │ │ │
▼ ▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Managed │ │ Managed │ │ Managed │ │ Managed │
│ Cluster 1 │ │ Cluster 2 │ │ Cluster 3 │ │ Cluster N │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
Implementation Plan
Foundation Phase
- Add OCM hub configuration support
- Implement cluster discovery via ManagedCluster CRDs
- Basic cluster-proxy integration
Core Operations Phase
- Extend existing tools with cluster selection
- Multi-cluster resource operations
- Cross-cluster monitoring
Advanced Features Phase
- Cross-cluster resource comparison
- Multi-cluster Helm operations
- Policy and compliance integration
Benefits
For End Users
- Unified Interface: Single MCP server instance for multiple clusters
- Improved Productivity: No need to manually switch contexts or manage multiple connections
- Better Visibility: Cross-cluster resource overview and comparison
For Enterprise Environments
- Centralized Management: Leverage existing OCM infrastructure
- Security: Secure cluster access through OCM's authentication and authorization
- Scalability: Support for hundreds of managed clusters
Use Cases
- Multi-Environment Management: Compare resources between dev/staging/prod
- Disaster Recovery: Quick failover operations between clusters
- Workload Migration: Move applications between clusters with AI assistance
- Compliance Monitoring: Cross-cluster policy and security scanning
Open Cluster Management Integration Points
Cluster-Proxy Addon
- Secure Tunneling: Use cluster-proxy for secure communication to managed clusters
- Authentication: Leverage OCM's existing authentication mechanisms
- Load Balancing: Distribute requests across healthy cluster connections
ManagedCluster CRDs
- Cluster Discovery: Query ManagedCluster resources for available clusters
- Health Monitoring: Check cluster health and availability before operations
- Metadata Integration: Use cluster labels and annotations for routing
Policy Integration
- Governance: Respect OCM governance policies for cluster access
- Compliance: Integrate with OCM's compliance monitoring
- Security: Use OCM's security scanning and vulnerability management
References
Expected Outcome: A comprehensive multi-cluster MCP server that leverages Open Cluster Management infrastructure to provide seamless multi-cluster Kubernetes operations through AI assistants.
Metadata
Metadata
Assignees
Labels
No labels