Skip to content
/ st-k8s Public

View and chat to your Kubernetes cluster. Features a dashboard with a K9s inspired dark theme, REST API and MCP server. Built with NextJS and uses the Copilot-SDK.

Notifications You must be signed in to change notification settings

bhf/st-k8s

Repository files navigation

ST-K8s

View and chat to your Kubernetes cluster.

Features a dashboard (with a K9s inspired dark theme), REST API, and MCP server. In browser AI chat powered by the Copilot SDK (technical preview). Integrates with VSCode and Copilot.

img.png

Uses Github Projects for planning and tracking.

Table of Contents

How to Run

git clone https://github.com/bhf/st-k8s
npm run build
npm run start

To use the browser based chat feature make sure you install the Copilot CLI.

Back to Top

API

Swagger spec available at http://localhost:3000/openapi.json after starting the server or from the public folder.

Back to Top

Model Context Protocol (MCP) Server

This project includes an MCP server that exposes Kubernetes tools to LLMs over stdio. Here are some example uses:

  • List of pods
  • Rank containers by their memory requests and limits
  • Summary of the last events in the namespace

img_1.png

img_2.png

Back to Top

Features

Exposes read-only Kubernetes operations as tools:

  • list_namespaces
  • list_pods
  • list_deployments
  • list_services
  • list_daemonsets
  • list_replicasets
  • list_statefulsets
  • list_ingresses
  • list_endpoints
  • list_events
  • list_pvcs

Back to Top

Running the MCP Server

Make sure to auth your kubectl context in your preferred way before running the MCP server.

You can run the MCP server directly using:

npm run mcp

You can also run it from VSCode or any MCP-compatible client by configuring it as shown below.

Back to Top

Configuring for VSCode

Add the following to your mcp.json

{
  "servers": {
    "k8s-tools": {
      "command": "npm",
      "args": ["run", "mcp"],
      "cwd": "/absolute/path/to/st-k8s",
      "disabled": false,
      "autoApprove": [] 
    }
  }
}

Make sure to replace /absolute/path/to/st-k8s with the actual path to this repository on your machine.

Back to Top

LLM Integration Techniques

This project uses several LLM-based techniques to enhance the development lifecycle and user experience. These artifacts are located in the .github directory:

  • Agents: Domain-specific personas, such as the Expert Next.js Developer (.github/agents/expert-nextjs-developer.agent.md), which embody specialized knowledge for consistent code generation.
  • Instructions: Contextual guidelines including copilot-instructions.md (project overview) and nextjs-tailwind.instructions.md that enforce coding standards and architectural patterns.
  • Skills: Reusable capabilities like the excalidraw-diagram-generator (.github/skills/) that allow the model to perform complex tasks like generating visual diagrams from natural language.
  • Prompts: Curated prompt templates (e.g., clean-excalidraw.prompt.md) ensuring high-quality, reproducible outputs for specific tasks.

Back to Top

High Level Architecture

alt text

Back to Top

About

View and chat to your Kubernetes cluster. Features a dashboard with a K9s inspired dark theme, REST API and MCP server. Built with NextJS and uses the Copilot-SDK.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages