Logo: k8s_pilot

k8s_pilot

Communautéit
bourbonkk

Kubernetes Control Plane Server for Managing Multiple Clusters – the central pilot for your k8s fleets✈️✈️

Editeurbourbonkk
Repositoryk8s-pilot
SproochPython
Forks
6
Stären
14
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzApache-2.0
Linken
  • Tools mat KI-Workflows verbannen

    k8s_pilot bitt MCP-Funktiounen un, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • Disponibel Tools: 0

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an deem MCP-Client ze konfiguréieren, deen Dir am léifste benotzt.

  • Interessi vun der Communautéit um Open-Source-Projet

    Zuele vum verlinkte Repository – Stären: 14, Forks: 6.

k8s-pilot-ci

The Central Pilot for Your Kubernetes Fleets ✈️✈️

k8s_pilot is a lightweight, centralized control plane server for managing multiple Kubernetes clusters at once.
With powerful tools and intuitive APIs, you can observe and control all your clusters from one cockpit.


🚀 Overview

  • 🔄 Supports multi-cluster context switching
  • 🔧 Enables CRUD operations on most common Kubernetes resources
  • 🔒 Readonly mode for safe cluster inspection
  • ⚙️ Powered by MCP for Claude AI and beyond
  • 🌐 Streamable HTTP transport support for remote access
  • 🤖 MCP Prompts for guided operations
  • 📝 Context-aware logging for write operations

🧰 Prerequisites

  • Python 3.13 or higher
  • uv package manager
  • Access to Kubernetes clusters (~/.kube/config or in-cluster config)
bash
# Install uv (if not installed)

# For MacOS
brew install uv

# For Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

Installation

bash
# Clone the repository
git clone https://github.com/bourbonkk/k8s-pilot.git
cd k8s-pilot

# Launch with uv + MCP
uv run --with "mcp[cli]>=1.28.0,<2" python k8s_pilot.py

🆕 What's New in v2.0

  • Streamable HTTP Transport: Remote cluster management via HTTP (in addition to stdio)
  • MCP Prompts: Built-in prompt templates for common K8s operations
  • Context-aware Logging: Write operations now report progress via MCP context
  • Bug Fixes: Fixed missing API clients for Ingress and RBAC resources
  • Security: Added readonly checks for node modification operations
  • Dockerfile: Modernized with uv package manager for faster builds

Usage

Normal Mode (Full Access)

bash
# Start with full read/write access
uv run --with "mcp[cli]>=1.28.0,<2" python k8s_pilot.py

Readonly Mode (Safe Inspection)

bash
# Start in readonly mode - only read operations allowed
uv run --with "mcp[cli]>=1.28.0,<2" python k8s_pilot.py --readonly

Streamable HTTP Mode (Remote Access)

bash
# Start with Streamable HTTP transport for remote access
uv run --with "mcp[cli]>=1.28.0,<2" python k8s_pilot.py --transport streamable-http

Command Line Options

bash
# Show help
uv run --with "mcp[cli]>=1.28.0,<2" python k8s_pilot.py --help

Run via Docker

You can run k8s-pilot directly using the published Docker image without installing uv locally. Make sure to mount your ~/.kube/config so the container can access your clusters.

bash
docker run -i --rm \
  -v ~/.kube/config:/root/.kube/config \
  ghcr.io/bourbonkk/k8s-pilot:latest

Readonly Mode

The --readonly flag enables a safety mode that prevents any write operations to your Kubernetes clusters. This is perfect for:

  • Cluster inspection without risk of accidental changes
  • Audit scenarios where you need to view but not modify
  • Learning environments where you want to explore safely
  • Production monitoring with zero risk of modifications

Protected Operations (Blocked in Readonly Mode)

  • pod_create, pod_update, pod_delete
  • deployment_create, deployment_update, deployment_delete
  • service_create, service_update, service_delete
  • configmap_create, configmap_update, configmap_delete
  • secret_create, secret_update, secret_delete
  • namespace_create, namespace_delete
  • All other create/update/delete operations

Allowed Operations (Always Available)

  • pod_list, pod_detail, pod_logs
  • deployment_list, deployment_get
  • service_list, service_get
  • configmap_list, configmap_get
  • secret_list, secret_get
  • namespace_list, namespace_get
  • All other list/get operations

MCP Prompts

k8s-pilot includes built-in prompt templates for common operations:

PromptDescription
troubleshoot_podStep-by-step pod troubleshooting guide
deployment_guideGuided application deployment workflow
cluster_health_checkComprehensive cluster health assessment
namespace_cleanupSafe namespace cleanup procedure

Usage with Claude Desktop

Use this config to run k8s_pilot MCP server from within Claude:

json
{
  "mcpServers": {
    "k8s_pilot": {
      "command": "uv",
      "args": [
        "--directory",
        "<path-to-cloned-repo>/k8s-pilot",
        "run",
        "--with",
        "mcp[cli]>=1.28.0,<2",
        "python",
        "k8s_pilot.py"
      ]
    }
  }
}

For readonly mode, use this configuration:

json
{
  "mcpServers": {
    "k8s_pilot_readonly": {
      "command": "uv",
      "args": [
        "--directory",
        "<path-to-cloned-repo>/k8s-pilot",
        "run",
        "--with",
        "mcp[cli]>=1.28.0,<2",
        "python",
        "k8s_pilot.py",
        "--readonly"
      ]
    }
  }
}

For Docker, use this configuration (replace YOUR_USERNAME with your actual Mac user name):

json
{
  "mcpServers": {
    "k8s_pilot_docker": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/Users/YOUR_USERNAME/.kube/config:/root/.kube/config",
        "ghcr.io/bourbonkk/k8s-pilot:latest"
      ]
    }
  }
}

Replace <path-to-cloned-repo> with the actual directory where you cloned the repo.

Scenario

Create a Deployment using the nginx:latest image in the pypy namespace, and also create a Service that connects to it. deploy와 서비스생성(영어

Key Features

Multi-Cluster Management

  • Seamlessly interact with multiple Kubernetes clusters
  • Perform context-aware operations
  • Easily switch between clusters via MCP prompts

Resource Control

  • View, create, update, delete:
    • Deployments, Services, Pods
    • ConfigMaps, Secrets, Ingresses
    • StatefulSets, DaemonSets
    • Roles, ClusterRoles
    • PersistentVolumes & Claims

Namespace Operations

  • Create/delete namespaces
  • List all resources in a namespace
  • Manage labels and resource quotas

Node Management

  • View node details and conditions
  • Cordon/uncordon, label/taint nodes
  • List pods per node

License

This project is licensed under the MIT License. See the LICENSE file for details.

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "bourbonkk-k8s-pilot": {
      "command": "",
      "args": []
    }
  }
}

k8s_pilot MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal k8s_pilot verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung, fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector: D'Optioun „Dësen Apparat“ ass ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Setzt de kopéierte Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

k8s_pilot als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a setzt d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Setzt d'MCP-Serverkonfiguratioun fir k8s_pilot an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert d'Säit, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "bourbonkk-k8s-pilot": {
      "command": "npx",
      "args": [
        "-y",
        "k8s-pilot"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vun der Integratioun k8s_pilot. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vun der Integratioun k8s_pilot.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat k8s_pilot bei dëser Aufgab hëllefen?
k8s_pilot
Jo. Ech hunn et gelies.
Dat hunn ech mat k8s_pilot fonnt.

Heefeg gestallte Froen

Fir wat gëtt den MCP-Server k8s_pilot benotzt?

k8s_pilot ass en MCP-Server, deen et kompatibele KI-Clienten erlaabt, op extern Tools a Kontextinformatioune zouzegräifen. An TypingMind kënnt Dir dësen MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech k8s_pilot MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir k8s_pilot mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni den MCP-Server fir all Modell separat anzeriichten.

Firwat k8s_pilot MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann k8s_pilot verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Ären Aarbechtsoflaf beim Chatten an TypingMind organiséieren.

Wéi verbannen ech k8s_pilot MCP mat TypingMind?

k8s_pilot leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann den MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt k8s_pilot MCP an TypingMind zur Verfügung?

k8s_pilot stellt MCP-Funktioune zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agente zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir k8s_pilot MCP ze benotzen?

Nee. TypingMind ass nom Local-first-Prinzip opgebaut a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann k8s_pilot eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir deen MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇