A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/razvanmacovei/k8s-multicluster-mcp below:

razvanmacovei/k8s-multicluster-mcp: An MCP (Model Context Protocol) server application for Kubernetes operations, providing a standardized API to interact with multiple Kubernetes clusters simultaneously using multiple kubeconfig files.

Multi Cluster Kubernetes MCP Server

An MCP (Model Context Protocol) server application for Kubernetes operations, providing a standardized API to interact with multiple Kubernetes clusters simultaneously using multiple kubeconfig files.

MCPO Server Configuration

Add the following configuration to your MCPO server's config.json file (e.g., in Claude Desktop):

{
  "mcpServers": {
    "kubernetes": {
      "command": "python3",
      "args": ["/path/to/k8s-multicluster-mcp/app.py"],
      "env": {
        "KUBECONFIG_DIR": "/path/to/your/kubeconfigs"
      }
    }
  }
}

Replace /path/to/your/kubeconfigs with the actual path to your kubeconfig files directory.

The server expects multiple kubeconfig files to be placed in the directory you specified. Each kubeconfig file represents a different Kubernetes cluster that you can interact with.

To install Multi Cluster Kubernetes Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @razvanmacovei/k8s-multicluster-mcp --client claude
Setting up a Local Environment
  1. Clone the repository

    git clone https://github.com/razvanmacovei/k8s-multicluster-mcp.git
    cd k8s-multicluster-mcp
  2. Create a virtual environment

    # Using venv (built-in)
    python3 -m venv .venv
    
    # Activate the virtual environment
    # On Windows
    .venv\Scripts\activate
    
    # On macOS/Linux
    source .venv/bin/activate
  3. Install dependencies

    # Using pip
    pip install -r requirements.txt
    
    # Or using uv (faster)
    uv pip install -r requirements.txt
  4. Configure your environment

  5. Run the application

This MCP server is designed specifically to work with multiple Kubernetes clusters:

The Kubernetes MCP Server provides a comprehensive set of tools for interacting with Kubernetes clusters:

Here are some examples of how to use the Kubernetes MCP Server with AI assistants:

List all available contexts across my kubeconfig files.
Compare the number of pods running in the 'backend' namespace between my 'prod' and 'staging' contexts.
Show me resource usage across all nodes in my 'dev' and 'prod' clusters.
Diagnose Application Issues
I have a deployment called 'my-app' in the 'production' namespace that's having issues. Can you check what's wrong?
I need to scale my 'backend' deployment in the 'default' namespace to 5 replicas.
Investigate Resource Usage
Show me the resource usage of nodes in my cluster.
My application 'web-app' in namespace 'web' is experiencing OOM issues. Can you increase the memory limit of the 'app' container to 512Mi?
I need to rollback my 'api-gateway' deployment in the 'services' namespace to the previous version.
What APIs are available in my Kubernetes cluster?
Can you describe the pod 'my-pod' in the 'default' namespace?
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  namespace: default
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.21
        ports:
        - containerPort: 80
Expose my 'backend' deployment in the 'default' namespace as a service on port 80 targeting port 8080.
Execute the command 'ls -la /app' in the 'app' container of pod 'web-app-1234' in the 'default' namespace.
I need to perform maintenance on node 'worker-1'. Please cordon it, drain it, and then uncordon it after I complete my work.
Apply this configuration to update my existing deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
  name: existing-deployment
  namespace: default
spec:
  replicas: 3
  template:
    spec:
      containers:
      - name: app
        image: myapp:v2
Patch the 'my-configmap' ConfigMap in the 'default' namespace to add a new key 'NEW_SETTING' with value 'enabled'.
Add the label 'environment=production' to the 'api' deployment in the 'backend' namespace.

The server implements the following MCP tools:

Resource Creation and Management Tools Workload Management Tools

Contributions are welcome! Please feel free to submit a Pull Request.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4