Kubernetes

Kubernetes

Connect to Kubernetes cluster and manage pods, deployments, and services.

1,190
Stars
194
Forks
20
Releases

Overview

MCP Server Kubernetes connects to a Kubernetes cluster and provides a unified MCP-based interface to manage cluster resources. It supports loading kubeconfig from multiple sources in priority order, enabling connections to contexts across environments. The server exposes a single, unified kubectl API for common operations such as Get/List/Describe, Create/Apply/Delete, Get Logs, Context management, Explain, List API resources, Scale, Patch, and Rollout, plus a generic kubectl command path (kubectl_generic) and a health check (ping). Beyond basic resource management, the server offers advanced capabilities: scaling deployments, port forwarding to pods or services, and Helm operations (install, upgrade, uninstall) with support for custom values, repositories, and versions; includes template-based installation (helm_template_apply) and uninstall (helm_template_uninstall) to bypass authentication issues. It also provides pod cleanup (cleanup_pods) for pods in problematic states and node management (cordon, drain, uncordon) for maintenance and scaling. A non-destructive mode can be enabled to disable destructive actions, with explicit command controls and an environment variable to enforce it. It includes security features like secrets masking and a dedicated troubleshooting prompt (k8s-diagnose) to guide autonomous Kubernetes diagnostics.

Details

Owner
Flux159
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

Cluster connection and kubeconfig loading

Connects to a Kubernetes cluster and loads kubeconfig from multiple sources in priority order to establish contexts.

Unified kubectl API

Provides a single API for common kubectl operations: get/list/describe, create/apply/delete, logs, context management, explain, list_api_resources, scale, patch, rollout, plus kubectl_generic and ping.

Port forwarding

Supports port-forwarding to pods and services for local access and testing.

Helm operations

Install, upgrade, and uninstall Helm charts with support for custom values, repositories, and versions; includes template-based installation (helm_template_apply) and uninstall (helm_template_uninstall).

Pod cleanup and node management

Pod cleanup operations for problematic pods and node management (cordon, drain, uncordon) for maintenance and scaling.

Non-destructive mode

Non-destructive mode disables destructive actions; includes environment variable enforcement and clearly defined allowed/disallowed commands.

Secrets masking

Masks sensitive data in kubectl get secrets outputs to improve security without affecting logs.

Kubernetes diagnostics prompt

Dedicated k8s-diagnose prompt that guides users through a systematic Kubernetes troubleshooting flow.

Tags

KuberneteskubectlHelmMCPkubeconfigPort-forwardPod cleanupNode managementNon-destructive modeSecrets maskingKubernetes diagnostics