Skip to content

Feature Request: Multi-Cluster Operations Support via Open Cluster Management Cluster-Proxy #342

@yanmxa

Description

@yanmxa

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:

  1. Discover and manage multiple clusters registered with Open Cluster Management
  2. Route operations to specific clusters through the cluster-proxy addon
  3. Provide unified multi-cluster visibility across all managed clusters
  4. 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

  1. Multi-Environment Management: Compare resources between dev/staging/prod
  2. Disaster Recovery: Quick failover operations between clusters
  3. Workload Migration: Move applications between clusters with AI assistance
  4. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions