Kubernetes

by hariohmprasath

6 stars
Not rated
GitHub

About

Enables direct Kubernetes cluster management through a Kotlin-based server that provides tools for monitoring and controlling pods, deployments, services, storage, networking, and Helm releases using the official Kubernetes Java client.

Details

Author
hariohmprasath
Repository
hariohmprasath/k8s-ai
GitHub stars
6
License
MIT License
Categories
AI, Developer Tools, File Management, Infrastructure

This AI-powered system understands natural language queries about your Kubernetes cluster. Here are some of the capabilities provided by the system which can be queried using natural language:

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Kubernetes
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install minikube and create a nginx deployment:


brew install minikube

kubectl config use-context minikube

kubectl create deployment nginx --image=nginx:latest

kubectl get pods

> Note: You should see nginx pod in the output

Cluster Health and Diagnostics

Perform various diagnostics on the cluster, including checking the status, identifying failing pods, and providing a complete health check.

Network Analysis

Analyze network configurations by listing services, checking endpoints, and viewing logs for specific services.

Storage Management

Manage storage resources by listing persistent volumes, checking unbound storage claims, and identifying pods using persistent storage.

Job and CronJob Analysis

Analyze jobs and CronJobs by listing running jobs, checking failed jobs, and reviewing the execution history of specific jobs.

Helm Release Management

Manage Helm releases including listing releases, upgrading charts, rolling back failed releases, and comparing values between releases.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "kubernetes": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

🎯 Kubernetes AI Management System

Spring Boot
Kubernetes
Kotlin
License

> AI-Powered Kubernetes Management (MCP + Agent)

    ⎈ K8s AI Management
    ├── 🤖 MCP Server
    ├── 🔍 K8s Tools
    └── 🚀 Agent mode with Rest API

✨ Overview

This project combines the power of AI with Kubernetes management. Users can perform real-time diagnostics, resource monitoring, and smart log analysis. It simplifies Kubernetes management through conversational AI, providing a modern alternative.

> 💡 Just ask questions naturally - no need to memorize commands!

🏗️ Project Structure

The project is organized into the following modules:

- agent: Agent mode backed by Rest API to analyze the cluster using natural language
- mcp-server: MCP server backed by tools which can be integrated with MCP host (like Claude desktop) to provide a full experience
- tools: Kubernetes tools for cluster analysis/management (used by both agent and mcp-server)

🎁 Features

This AI-powered system understands natural language queries about your Kubernetes cluster. Here are some of the capabilities provided by the system which can be queried using natural language:

🏥 Cluster Health and Diagnostics

- "What's the status of my cluster?"
- "Show me all pods in the default namespace"
- "Are there any failing pods? in default namespace"
- "What's using the most resources in my cluster?"
- "Give me a complete health check of the cluster"
- "Are there any nodes not in Ready state?"
- "Show me pods in default namespace that have been running for more than 7 days"
- "Identify any pods running in default namespace with high restart counts"

🌐 Network Analysis

- "Show me the logs for the payment service"
- "List all ingresses in the cluster"
- "Show me all services and their endpoints"
- "Check if my service 'api-gateway' has any endpoints"
- "Show me all exposed services with external IPs"

💾 Storage Management

- "List all persistent volumes in the cluster"
- "Show me storage claims that are unbound"
- "What storage classes are available in the cluster?"
- "Which pods are using persistent storage?"
- "Are there any storage volumes nearing capacity?"

⏱️ Job and CronJob Analysis

- "List all running jobs in the batch namespace"
- "Show me failed jobs from the last 24 hours"
- "What CronJobs are scheduled to run in the next hour?"
- "Show me the execution history of the 'backup' job"

⎈ Helm Release Management

- "List all Helm releases"
- "Upgrade the MongoDB chart to version 12.1.0"
- "What values are configured for my Prometheus release?"
- "Rollback the failed Elasticsearch release"
- "Show me the revision history for my Prometheus release"
- "Compare values between different Helm releases"
- "Check for outdated Helm charts in my cluster"
- "What are the dependencies for my Elasticsearch chart?"

> Note: The system uses AI to analyze patterns in logs, events, and resource usage to provide intelligent diagnostics and recommendations.

🛠️ Prerequisites

| Requirement | Version |
|------------|----------|
| ☕ JDK | 17 or later |
| 🧰 Maven | 3.8 or later |
| ⎈ Minikube/Any Kubernetes cluster | Configured ~/.kube/config |

> Note: The system uses the kubeconfig file from ~/.kube/config, so make sure it is properly configured.

---

🏗️ 1. Project Build

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.