Chat with your Kubernetes cluster using natural language! This project connects OpenWebUI to Kubernetes, letting you manage your cluster through conversational AI. Ask questions like "What pods are running?" or "Scale my deployment to 5 replicas" and get instant results. - Quick Start - Configure Open-WebUI - Step 1: Access Open-WebUI - Step 2: Add the MCP Bridge Tool Server - Step 3: Add Connecti
Add this skill
npx mdskills install elevy99927/devops-mcp-webuiComprehensive Kubernetes management through natural language chat with excellent setup docs
1# Open WebUI Kubernetes Integration23[](https://docs.docker.com/compose/)4[](https://kubernetes.io/)5[](https://github.com/open-webui/open-webui)6[](https://ollama.ai/)7[](https://www.anthropic.com/news/introducing-mcp)8[](https://kind.sigs.k8s.io/)9[](https://helm.sh/)10[](https://kubernetes.io/docs/reference/kubectl/)11[](https://opensource.org/licenses/MIT)1213## TL;DR1415**Chat with your Kubernetes cluster using natural language!**1617This project connects OpenWebUI to Kubernetes, letting you manage your cluster through conversational AI. Ask questions like "What pods are running?" or "Scale my deployment to 5 replicas" and get instant results.1819---2021## Table of Contents2223- [TL;DR](#tldr)24 - [Quick Start](#quick-start)25- [Configure Open-WebUI](#configure-open-webui)26 - [Step 1: Access Open-WebUI](#step-1-access-open-webui)27 - [Step 2: Add the MCP Bridge Tool Server](#step-2-add-the-mcp-bridge-tool-server)28 - [Step 3: Add Connections to Models](#step-3-add-connections-to-models)29 - [Step 4: Verify Tool Integration](#step-4-verify-tool-integration)30 - [Step 5: Test the Integration](#step-5-test-the-integration)31- [Troubleshooting Configuration](#troubleshooting-configuration)32- [Architecture Overview](#architecture-overview)33 - [Architecture Diagram](#architecture-diagram)34 - [Data Flow](#data-flow)35 - [Network Architecture](#network-architecture)36- [Repository Structure](#-repository-structure)37- [Components](#components)38 - [1. Open WebUI](#1-open-webui)39 - [2. Ollama](#2-ollama)40 - [3. MCP-Bridge](#3-mcpo-mcp-bridge)41 - [4. Kubernetes Cluster](#4-kubernetes-cluster)42- [Usage](#usage)4344---454647### Quick Start4849**One-command setup:**50```bash51./install.sh52```5354**Componentes installed:**55- Kind (Kubernetes in Docker)56- Open Web UI57- Ollama58- MCP bridge5960**After successful installation, you'll see:**61✅ Docker Compose startup complete!6263Services available at:64 - Open WebUI: <a href="http://localhost:3000">http://localhost:3000</A>65 - MCP Bridge: <a href="http://localhost:9000">http://localhost:9000</A>66 - Ollama API: <a href="http://localhost:11434">http://localhost:11434</A>6768Configure Open WebUI to use the MCP tools6970## Configure Open-WebUI7172After running the installation script, you need to configure Open-WebUI to use the Kubernetes tools:7374### Step 1: Access Open-WebUI751. Open your browser and go to **http://localhost:3000**762. **Create an admin account** on first visit773. **Sign in** with your new account7879### Step 2: Add the MCP Bridge Tool Server801. Click on your **profile icon** (top right)812. Go to **Settings**823. Navigate to **Admin Panel** → **Tools**834. Click **"+ Add Tool Server"**845. Enter the following details:85 - **Name**: `Kubernetes Tools`86 - **URL**: `http://mcpo:9000`87 - **Description**: `Kubernetes management via kubectl and helm`886. Click **"Add"**89---90<img src="images/openwebui-config-tool.png">9192---9394### Step 3: Add Connections to Models95Configure your AI model connections - use the local Ollama or add remote connections:96971. In **Settings**, go to **Admin Panel** → **Connections**982. **For Local Ollama** (recommended):99 - The local Ollama server should be automatically detected100 - Verify connection to `http://ollama:11434`1013. **For Remote Connections** (optional):102 - Add OpenAI, Anthropic, or other model providers103 - Configure API keys and endpoints as needed104105<img src="./images/openwebui-connections.png">106107### Step 4: Verify Tool Integration1081. Go back to the **chat interface**1092. Look for the **tools icon** (🔧) in the chat input area1103. You should see available tools like:111 - `kubectl_get` - List Kubernetes resources112 - `kubectl_apply` - Apply manifests113 - `kubectl_describe` - Describe resources114 - `helm_install` - Install Helm charts115 - And more...116117### Step 5: Test the Integration118Try asking these questions to verify everything works (copy and paste into the chat):119120**Copy & Paste these queries:**121122```123What pods are running in the kube-system namespace?124```125126```127Show me all services in the default namespace128```129130```131List all deployments across all namespaces132```133134```135Create a new namespace called production136```137138```139Install Jenkins using Helm in the jenkins namespace140```141142## Troubleshooting Configuration143144**If tools don't appear:**145- Check that the MCP Bridge is running: `curl http://localhost:9000/health`146- Verify the tool server URL is exactly: `http://mcpo:9000`147- Restart Open-WebUI: `docker-compose restart open-webui`148149**If you get connection errors:**150- Ensure all containers are running: `docker-compose ps`151- Check container logs: `docker-compose logs mcpo`152- Verify network connectivity between containers153154155156**Then open http://localhost:3000 and start chatting with your cluster!**157158**Example queries:**159- "What pods are running in kube-system?"160- "Show me all services in default namespace"161- "Create a new namespace called production"162- "Install Jenkins using Helm in the jenkins namespace"163164---165166## Architecture Overview167168This project integrates Open WebUI with Kubernetes management capabilities through a bridge architecture that connects multiple components to provide AI-powered Kubernetes operations.169170171### Architecture Diagram172173```mermaid174graph TB175176 subgraph "External AI Services"177 Gemini[Google Gemini<br/>External API]178 end179180 subgraph "User Interface"181 User[User]182 end183184 subgraph "UI Layer"185 OpenWebUI[Open WebUI<br/>Port: 3000]186 Ollama[Ollama<br/>LLM Server<br/>Port: 11434]187 end188189 subgraph "Bridge Layer"190 MCP-Bridge[MCP-Bridge<br/>OpenAPI Bridge<br/>Port: 9000]191 end192193 subgraph "Target Infrastructure"194 K8s[Kubernetes Cluster<br/>kubectl, helm, istioctl]195 end196197 subgraph "Configuration"198 KubeConfig[kubeconfig<br/>./kube/config]199 end200201202203 %% User interactions204 User -->|Chat & Commands| OpenWebUI205206 %% AI Layer connections207 OpenWebUI -->|LLM Requests| Ollama208 OpenWebUI -.->|External API Calls| Gemini209 OpenWebUI -->|Tool Calls<br/>OpenAPI/REST| MCP-Bridge210211 %% Bridge Layer to Kubernetes212 MCP-Bridge -->|kubectl commands| K8s213 MCP-Bridge -->|helm operations| K8s214 MCP-Bridge -->|istioctl commands| K8s215216 %% Configuration217 KubeConfig -.->|Mounted Volume| MCP-Bridge218219 %% Styling220 classDef userLayer fill:#e1f5fe221 classDef aiLayer fill:#f3e5f5222 classDef externalLayer fill:#fff8e1223 classDef bridgeLayer fill:#fff3e0224 classDef mcpLayer fill:#e8f5e8225 classDef k8sLayer fill:#fce4ec226 classDef configLayer fill:#f1f8e9227228 class User userLayer229 class OpenWebUI,Ollama aiLayer230 class Gemini,OpenAI,Anthropic externalLayer231 class MCP-Bridge bridgeLayer232 class K8s k8sLayer233 class KubeConfig configLayer234```235236---237238### Data Flow2392401. **User Query**: User asks a Kubernetes-related question in Open WebUI2412. **AI Processing**: Ollama processes the query and determines if tools are needed2423. **Tool Selection**: Open WebUI identifies the appropriate kubectl_get tool2434. **API Call**: Open WebUI makes REST API call to MCPO bridge2445. **Protocol Translation**: MCPO translates REST call to MCP protocol2456. **Response Chain**: Results flow back through the same chain to the user246247### Network Architecture248249```mermaid250graph LR251 subgraph "Docker Network: mcp-lab-network"252 subgraph "External Access"253 Host[Host Machine<br/>localhost:3000<br/>localhost:9000]254 end255256 subgraph "Internal Services"257 OW[open-webui:8080]258 MC[mcpo:9000]259 K8S[Kubernetes:6443]260 OL[ollama:11434]261 end262 end263264 Host -->|Port 3000| OW265 Host -->|Port 9000| MC266 OW --> OL267 OW --> MC268 MC --> K8S269```270---271272## 📂 Repository Structure273274```275openwebui-k8s-bridge/276├── mcp-bridge/ # Bridge service code277├── scripts/ # Setup and utility scripts278├── tests/ # Test scripts and examples279├── docs/ # Documentation280├── kube/ # Kubernetes configuration281├── docker-compose.yml # Complete stack setup282└── README.md # Main documentation283```284285## Components286287### 1. **Open WebUI**288- **Purpose**: Web-based chat interface for AI interactions289- **Port**: 3000290- **Role**: Provides the user interface and orchestrates AI conversations with tool calling capabilities291- **Key Features**:292 - Chat interface for natural language Kubernetes queries293 - Tool server integration for external API calls294 - Model management and conversation history295296### 2. **Ollama**297- **Purpose**: Local LLM server298- **Port**: 11434299- **Role**: Provides the AI language model (llama3.2:latest) for understanding user queries and generating responses300- **Key Features**:301 - Local model hosting302 - Function calling capabilities303 - Integration with Open WebUI304305### 3. **MCP Bridge**306- **Purpose**: Protocol bridge between OpenAPI and MCP307- **Port**: 9000308- **Role**: Translates REST API calls from Open WebUI into MCP protocol calls309- **Key Features**:310 - OpenAPI specification generation for Open WebUI311 - REST to MCP protocol translation312 - Tool parameter validation and formatting313314### 4 **Kubernetes Cluster**315- **Purpose**: Target infrastructure for management operations316- **Role**: The actual Kubernetes cluster being managed317- **Access**: Through kubeconfig mounted as volume318319## Usage320321Once configured, you can ask natural language questions about your Kubernetes cluster:322323- "What pods are running in the kube-system namespace?"324- "Show me all services in the default namespace"325- "List all deployments across all namespaces"326- "Get the logs from the nginx pod"327- install argocd using helm from repo https://argoproj.github.io/argo-helm328---329<img src="./images/kubectl_pods_query_01.png">330---331<img src="./images/helm_install_argo.png">332---333<img src="./images/open-webui-install-argocd.png">334335336The AI will automatically use the appropriate Kubernetes tools to execute commands and provide formatted responses.337---338339## Open in Google Cloud Shell340341You can directly open this repository in Google Cloud Shell to start exploring the examples:342343[](https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/elevy99927/devops-mcp-webui)344345346---347## Contact348349For questions or feedback, feel free to reach out:350351- **Email**: eyal@levys.co.il352- **GitHub**: [https://github.com/elevy99927](https://github.com/elevy99927)353354355
Full transparency — inspect the skill content before installing.