kubernetes-ai-dashboard README

项目的 README,来自 github.com/shiyi25928988/kubernetes-ai-dashboard。合并为一个 markdown 文件:README.md。

Kubernetes AI Dashboard

K8s Cluster Management + AI Assistant Platform

Java Spring Boot Vue Kubernetes License

🇺🇸 English | 🇨🇳 简体中文

Table of Contents

Introduction

Kubernetes AI Dashboard is an operations-oriented Kubernetes management platform with an integrated AI assistant. Built on the Fabric8 Kubernetes Client for full-resource cluster operations, Spring AI for tool-calling and chat, and a built-in A2A (Agent-to-Agent) protocol framework.

[!NOTE] Designed for ops scenarios — unified K8s cluster resource management with AI-assisted operations.

Features

Tech Stack

Category Technology Version
Language Java 21
Framework Spring Boot 3.5.8
AI Framework Spring AI 1.1.6
K8s Client Fabric8 Kubernetes Client 7.3.1
ORM MyBatis Plus 3.5.14
Auth Sa-Token 1.44.0
Object Storage MinIO 8.6.0
Database MySQL 8.0+
Cache Redis 7.0+
Frontend Framework Vue 3.5
Frontend Build Vite 8
UI Components Element Plus 2.13

Project Structure

graph TD
    A[kubernetes-ai-dashboard] --> B[dashboard backend app]
    A --> C[dashboard-fe frontend]
    A --> D[common shared module]
    A --> E[ai-base AI core]
    A --> F[oss object storage]
    A --> G[user auth]
    A --> H[search full-text search]
    A --> I[message site messages]
kubernetes-ai-dashboard/
├── dashboard/              # Backend main app (cc.shiyi.dashboard)
├── dashboard-fe/           # Frontend app (Vue 3)
├── common/                 # Shared module (AOP annotations, utils)
├── ai-base/                # AI core (ChatClient pool, chat memory)
├── oss/                    # Object storage (MinIO)
├── user/                   # Auth (Sa-Token)
├── search/                 # Full-text search (Lucene)
├── message/                # Site messages
└── pom.xml

Quick Start

Prerequisites

Start Dependencies

cd docker
docker-compose up -d mysql redis minio

Backend

mvn clean install -DskipTests
cd dashboard
mvn spring-boot:run

Backend runs at http://localhost:8080

Frontend

cd dashboard-fe
npm install
npm run dev

Frontend runs at http://localhost:3000

Configuration

Config file: dashboard/src/main/resources/application.yml. All values support ${ENV_VAR:default} overrides.

Env Var Description Default
SPRING_DATASOURCE_URL MySQL JDBC URL jdbc:mysql://127.0.0.1:3306/dashboard
SPRING_DATA_REDIS_HOST Redis host localhost
MINIO_ENDPOINT MinIO URL http://localhost:9000
SPRING_AI_OPENAI_BASE_URL AI API URL -
SPRING_AI_OPENAI_API_KEY AI API Key <YOUR_API_KEY>
KUBERNETES_CLIENT_TRUST_CERTS Trust K8s API certs true
DOCKER_REGISTRY_URL Docker Registry v2 address -
DOCKER_REGISTRY_USERNAME Docker Registry username -
DOCKER_REGISTRY_PASSWORD Docker Registry password -
A2A_API_KEY A2A protocol API Key <YOUR_API_KEY>

[!IMPORTANT] There is no kubeconfig entry point in config files. Upload kubeconfigs on the Cluster Config page of the web UI — they are stored in MySQL, several clusters may coexist, but exactly one is active and all K8s operations target the active cluster. Switching clusters takes effect immediately (no restart).

API Reference

Internal API (/api/v1/*, Sa-Token login required)

Method Path Description
POST /api/v1/ai/chat AI chat (streaming/non-streaming)
GET/POST/PUT/DELETE /api/v1/k8s/* K8s resource management (namespaced + cluster-scoped)
POST/GET/DELETE /api/v1/k8s/cluster-config* kubeconfig upload / list / activate / delete / test
GET /api/v1/k8s/cluster/stats Cluster statistics
GET /api/v1/resources/ownership Resource ownership query
GET /api/v1/oss/* Object storage (buckets / files / folders)
GET /api/v1/registry/* Image registry (repositories / tags / manifests)
POST/GET /api/v1/user/* User management

A2A Protocol (/a2a, API Key auth)

Method Path Description
GET /a2a/card Get AgentCard
GET /.well-known/agent-card.json Standard discovery endpoint
POST /a2a JSON-RPC 2.0 (message/send, tasks/get, tasks/cancel)
MCP Tools (7)
Tool Service Capability
KubernetesMcpService Namespace/Pod/Deployment ops, cluster stats
SystemInfoMcpService CPU/memory/disk/uptime
CommandLineMcpService Command execution (dangerous-command blacklist)
FileMcpService File read/write (sandboxed)
SshMcpService Remote SSH commands
OssMcpService MinIO upload/list
DockerRegistryMcpService Docker registry query

Deployment

For Docker deployment see DOCKER_README.md.

# Build backend image
docker build -f dashboard/Dockerfile -t <REGISTRY>/kubernetes-ai-dashboard-backend:latest .

# Build frontend image
docker build -f dashboard-fe/Dockerfile -t <REGISTRY>/kubernetes-ai-dashboard-frontend:latest ./dashboard-fe

Contributing

Issues and Pull Requests are welcome.

License

This project uses an Internal License and is not open-sourced.

kubernetes-ai-dashboard (shiyi25928988/kubernetes-ai-dashboard)

正在搜索数据库…

这是什么?Kubernetes AI Dashboard 是一个面向运维团队的 Web 平台,可管理完整的 Kubernetes 资源(Namespace、Pod、Deployment、Service、Ingress、PVC、ConfigMap、Secret、Event、Job、CRD),并提供一个 AI 助手,支持工具调用、内置的 MCP 工具链,以及用于 AI 辅助集群运维的 Agent-to-Agent(A2A)协议框架。
这是我要导入的库,还是独立应用?这是一个独立应用:后端基于 Java 21 / Spring Boot 3.5,使用 Fabric8 Kubernetes 客户端;前端是 Vue 3 + Vite。它不是可以嵌入其他项目的组件。
怎么把它跑起来?先用 Docker Compose 启动配套服务(MySQL、Redis、MinIO),然后用 Maven 构建并运行 Spring Boot 后端,用 Node.js 构建并运行 Vue 前端;Docker 部署的详细说明见 DOCKERREADME.md。
运行前需要先安装什么?需要 JDK 21+、Maven 3.9+、Node.js 18+、Docker 和 Docker Compose,以及可访问的 Kubernetes v1.24+ 集群。
安装时有哪些需要注意的坑?Kubernetes 客户端必须通过 KUBERNETESCLIENTCONFIGURL 或 KUBERNETESCLIENTCONFIGPATH 明确指定 kubeconfig,否则应用无法启动;它不会自动检测集群内的 ServiceAccount。
它包含哪些 AI 功能?Spring AI 提供流式聊天助手,支持工具调用和上下文记忆,并内置 7 个 MCP 工具服务,涵盖 K8s、系统信息、命令执行、文件、SSH、对象存储和 Docker 镜像仓库查询。
A2A 协议端点有什么用?它在 /a2a 提供 JSON-RPC 2.0 Agent-to-Agent 端点,并带有 AgentCard 发现路由,允许外部智能体发送消息和管理任务(message/send、tasks/get、tasks/cancel);README 将其标注为预留的扩展点。
资源的归属是如何追踪的?通过仪表盘创建的资源会标记创建者,用户只能删除自己创建的资源。
登录是如何保障安全的?用户登录使用 Sa-Token,令牌为 32 位随机字符串,会话存储在 Redis 中;这与 A2A 智能体协议端点所需的 API Key 认证是分开的。
大小
9.7 MB
星标
307
更新
提交Nov 12
时长
3个月
提交 · 90 天