Multi Cluster Kubernetes MCP Server
by razvanmacovei
This is an MCP server application for Kubernetes operations, providing a standardized API to interact with multiple Kubernetes clusters simultaneously. It uses multiple kubeconfig files for managing different clusters.
Last updated: N/A
What is Multi Cluster Kubernetes MCP Server?
The Multi Cluster Kubernetes MCP Server is an application that provides a standardized API (using the Model Context Protocol) to interact with multiple Kubernetes clusters. It enables centralized management and operations across various clusters using multiple kubeconfig files.
How to use Multi Cluster Kubernetes MCP Server?
To use the server, configure your MCPO server's config.json
to point to the application. Ensure you have Python 3.8 or higher installed, clone the repository, create a virtual environment, install dependencies using pip or uv, and set the KUBECONFIG_DIR
environment variable to the directory containing your kubeconfig files. Then, run the app.py
script. You can then interact with the server using the provided MCP tools.
Key features of Multi Cluster Kubernetes MCP Server
Multi-cluster management using multiple kubeconfig files
Centralized management of Kubernetes environments
Comprehensive set of tools for interacting with Kubernetes clusters
API discovery and Custom Resource Definition (CRD) management
Resource management (pods, deployments, services, etc.)
Metrics and monitoring of resource usage
Rollout management (status, history, undo, restart, pause, resume)
Scaling and autoscaling of resources
Node Management (cordon, uncordon, drain)
Resource Creation and Management Tools
Use cases of Multi Cluster Kubernetes MCP Server
Managing multiple Kubernetes environments (dev, staging, production)
Comparing resources and configurations across different clusters
Diagnosing application issues across multiple clusters
Automating rollout management and scaling across multiple clusters
Centralized monitoring of resource usage across multiple clusters
FAQ from Multi Cluster Kubernetes MCP Server
What is the purpose of KUBECONFIG_DIR?
What is the purpose of KUBECONFIG_DIR?
KUBECONFIG_DIR specifies the directory where your kubeconfig files are located. Each kubeconfig file represents a different Kubernetes cluster.
How do I switch between clusters?
How do I switch between clusters?
You can switch between clusters by specifying the context parameter in your commands.
What kind of resources can I manage with this server?
What kind of resources can I manage with this server?
You can manage any Kubernetes resource, including pods, deployments, services, statefulsets, daemonsets, and more.
Can I create new resources with this server?
Can I create new resources with this server?
Yes, you can create new Kubernetes resources from YAML/JSON content using the k8s_create_resource
tool.
How can I contribute to this project?
How can I contribute to this project?
Contributions are welcome! Please feel free to submit a Pull Request.