1. Conduid
  2. Cloud
  3. weibaohui/k8m
MCP server · Cloud

weibaohui/k8m

一款轻量级、跨平台的 Mini Kubernetes AI Dashboard,支持大模型+智能体+MCP(支持设置操作权限),集成多集群管理、智能分析、实时异常检测等功能,支持多架构并可单文件部署,助力高效集群管理与运维优化。

87Excellent

Scored 3 days ago · breakdown

About weibaohui/k8m

weibaohui/k8m is an MCP server published by weibaohui in the Cloud category: 一款轻量级、跨平台的 Mini Kubernetes AI Dashboard,支持大模型+智能体+MCP(支持设置操作权限),集成多集群管理、智能分析、实时异常检测等功能,支持多架构并可单文件部署,助力高效集群管理与运维优化。.

The repository has 888 stars and 160 forks, with the last commit 5 days ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/weibaohui/k8m

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about weibaohui/k8m

Powered by Claude · Grounded in docs

I know everything about weibaohui/k8m. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • !No dynamic code executionSource scan found eval or shell execution. Review how tool inputs reach it before granting credentials.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.26.21v0.26.21 · 3 Oct 2026安全修复:移除 JWT 默认密钥,改为服务端会话凭证 修复 #482:`JWT_TOKEN_SECRET` 缺省值为公开的 `your-secret-key`,攻击者可据此伪造平台管理员 token。 空库首次启动会自动创建 `k8m` 平台管理员账户,因此仅修改默认密码无法阻止伪造; 一旦 JWT 密钥被知晓,伪造 token 在修改密码后依然有效。 变更内容 改用服务端会话(Opaque Token)凭证 新增 `user_sessions` 表与…
v0.26.20v0.26.20 🌈 · 12 Sep 2026What’s Changed chore(deps): update frontend and backend dependencies to latest (#481) @weibaohui fix(ui): use Sender suffix instead of footer for custom action buttons @weibaohui fix(ui): await monaco asset copy in closeBundle @weibaohui…
v0.26.19v0.26.19 🌈 · 10 Sep 2026What’s Changed fix(ui): remove stray mobx-react-lite@^5.0.0 dependency causing blank page (#480) @weibaohui chore: update deployment image version to v0.26.18 @weibaohui 说明 修复 v0.26.18 中打开页面白屏、无法登录的问题(#469):意外混入的 `mobx-react-lite@^5.0.0` 与…
v0.26.18v0.26.18 🌈 · 14 Aug 2026What’s Changed ci(workflows): disable SLSA provenance to fix Aliyun registry push (#478) @weibaohui ci(workflows): use --ignore-scripts for pnpm install (#477) @weibaohui ci(workflows): pre-approve transitive build scripts for pnpm 11+…
v0.26.17v0.26.17 🌈 · 5 Mar 2026What’s Changed 修复 界面 显示问题

README

GitHub Repo Stars GitHub Repo Forks

License MIT Go Report Card GitHub Release GitHub Downloads (all assets, all releases) GitHub Repo Issues Trust Score zread Repobeats analytics image

English | 中文

k8m 是一款AI驱动的 Mini Kubernetes AI Dashboard 轻量级控制台工具,专为简化集群管理设计。它基于 AMIS 构建,并通过 kom 作为 Kubernetes API 客户端,k8m 内置了 Qwen2.5-Coder-7B,支持deepseek-ai/DeepSeek-R1-Distill-Qwen-7B模型 模型交互能力,同时支持接入您自己的私有化大模型(包括ollama)。

快速体验

本项目提供cnb 在线访问地址 k8m

  1. fork 这个项目后,
  2. 点击 仓库右上角 🛫起飞 按钮,
  3. 选择云IDE,
  4. 进入终端
  5. 输入cd letsfly/justforfun/k8m && docker-compose up -d && docker-compose ps
  6. 进入端口 (在终端 tab页面右边)
  7. 新建端口转发,填入8888,确定
  8. 点击生成的转发地址,打开k8m 登录页面
  9. 输入用户名密码:k8m k8m 。
  10. 🛫

文档

主要特点

  • 迷你化设计:所有功能整合在一个单一的可执行文件中,部署便捷,使用简单。
  • 简便易用:友好的用户界面和直观的操作流程,让 Kubernetes 管理更加轻松。支持标准k8s、aws eks、k3s、kind、k0s等集群类型。
  • 高效性能:后端采用 Golang 构建,前端基于百度 AMIS,保证资源利用率高、响应速度快。
  • AI驱动融合 :基于ChatGPT实现划词解释、资源指南、YAML属性自动翻译、Describe信息解读、日志AI问诊、运行命令推荐,并集成了k8s-gpt 功能,实现中文展现,为管理k8s提供智能化支持。
  • 功能插件化:特性功能插件化,按需开启,不开启不占资源。
  • MCP集成:可视化管理MCP,实现大模型调用Tools,内置k8s多集群MCP工具49种,可组合实现超百种集群操作,可作为MCP Server 供其他大模型软件使用。轻松实现大模型管理k8s。可详细记录每一次MCP调用。支持mcp.so主流服务。
  • MCP权限打通:多集群管理权限与MCP大模型调用权限打通,一句话概述:谁使用大模型,就用谁的权限执行MCP。安全使用,无后顾之忧,避免操作越权。
  • 多集群管理:自动识别集群内部使用InCluster模式,配置kubeconfig路径后自动扫描同级目录下的配置文件,同时注册管理多个集群,支持心跳检测与自动重连。
  • 多集群权限管理:支持对用户、用户组进行授权,可按集群授权,包括集群只读、Exec命令、集群管理员三种权限。对用户组授权后,组内用户均获得相应授权。支持设置命名空间黑白名单。
  • 支持k8s最新特性:支持APIGateway、OpenKruise等功能特性。
  • Pod文件管理:在Console 界面左侧的文件树,右键菜单,支持 Pod 内文件的浏览、编辑、上传、下载、删除,简化日常操作。
  • Pod运行管理:支持实时查看 Pod 日志,下载日志,并在 Pod 内直接执行 Shell 命令。支持Ctrl+F搜索,类似grep -A -B高亮搜索
  • API开放:支持创建API KEY,从第三方外部访问,提供swagger接口管理页面。
  • 集群巡检支持:支持多集群定时巡检、自定义巡检规则,支持lua脚本规则。支持发送到钉钉群、微信群、飞书群以及自定义webhook。支持AI总结。
  • k8s Event转发:支持多集群k8s Event转发到webhook中,可按集群、关键字、命名空间、名称等进行过滤,建立多个专门的监控转发通道。支持AI总结。
  • CRD管理:可自动发现并管理 CRD 资源,树状列出所有CRD,提高工作效率。
  • Helm市场:支持Helm自由添加仓库,一键安装、卸载、升级 Helm 应用,支持自动更新。
  • 跨平台支持:兼容 Linux、macOS 和 Windows,并支持 x86、ARM 等多种架构,确保多平台无缝运行。
  • 多数据库支持:支持SQLite、MySql、PostgreSql等多种数据库。
  • 完全开源:开放所有源码,无任何限制,可自由定制和扩展,可商业使用。

k8m 的设计理念是"AI驱动,轻便高效,化繁为简",它帮助开发者和运维人员快速上手,轻松管理 Kubernetes 集群。

运行

  1. 下载:从 GitHub release 下载最新版本。
  2. 运行:使用 ./k8m 命令启动,访问http://127.0.0.1:3618。
  3. 登录用户名密码:
    • 用户名:k8m
    • 密码:k8m
    • 请注意上线后修改用户名密码、启用两步验证。
  4. 参数:
Usage of ./k8m:
      --enable-temp-admin                是否启用临时管理员账户配置,默认关闭
      --admin-password string            管理员密码,启用临时管理员账户配置后生效 
      --admin-username string            管理员用户名,启用临时管理员账户配置后生效
      --print-config                     是否打印配置信息 (default false)
      --connect-cluster                  启动集群是是否自动连接现有集群,默认关闭
  -d, --debug                            调试模式
      --in-cluster                       是否自动注册纳管宿主集群,默认启用
      --jwt-token-secret string          已废弃,无实际作用(登录凭证已改为服务端会话)
  -c, --kubeconfig string                kubeconfig文件路径 (default "/root/.kube/config")
      --kubectl-shell-image string       Kubectl Shell 镜像。默认为 bitnami/kubectl:latest,必须包含kubectl命令 (default "bitnami/kubectl:latest")
      --log-v int                        klog的日志级别klog.V(2) (default 2)
      --login-type string                登录方式,password, oauth, token等,default is password (default "password")
      --image-pull-timeout               Node Shell、Kubectl Shell 镜像拉取超时时间。默认为 30 秒
      --node-shell-image string          NodeShell 镜像。 默认为 alpine:latest,必须包含`nsenter`命令 (default "alpine:latest")
  -p, --port int                         监听端口 (default 3618)
  -v, --v Level                          klog的日志级别 (default 2)

也可以直接通过docker-compose(推荐)启动:

services:
  k8m:
    container_name: k8m
    image: registry.cn-hangzhou.aliyuncs.com/minik8m/k8m
    restart: always
    ports:
      - "3618:3618"
    environment:
      TZ: Asia/Shanghai
    volumes:
      - ./data:/app/data

启动之后,访问3618端口,默认用户:k8m,默认密码k8m。 如果你想通过在线环境快速拉起体验,可以访问:k8m

容器化k8s集群方式运行

使用KinD、MiniKube 安装一个小型k8s集群

KinD方式

  • 创建 KinD Kubernetes 集群
brew install kind
  • 创建新的 Kubernetes 集群:
kind create cluster --name k8sgpt-demo

将k8m部署到集群中体验

安装脚本

kubectl apply -f https://raw.githubusercontent.com/weibaohui/k8m/refs/heads/main/deploy/k8m.yaml
  • 访问: 默认使用了nodePort开放,请访问31999端口。或自行配置Ingress http://NodePortIP:31999

生产部署启用主备选举插件,注意事项

  • 单实例运行service的定义不要加 k8m.io/role: leader 标签,加了不能正常访问。
  • 多实例运行service的定义必须加 k8m.io/role: leader 标签,否则不会切换。
  • 多实例运行的yaml如下:
kubectl apply -f https://raw.githubusercontent.com/weibaohui/k8m/refs/heads/main/deploy/k8m-ms.yaml

ChatGPT 配置指南

内置GPT

从v0.0.8版本开始,将内置GPT,无需配置。 如果您需要使用自己的GPT,请参考以下文档。

ChatGPT 状态调试

如果设置参数后,依然没有效果,请尝试使用./k8m -v 6获取更多的调试信息。 会输出以下信息,通过查看日志,确认是否启用ChatGPT。

开发调试

如果你想在本地开发调试,请先执行一次本地前端构建,自动生成dist目录。因为本项目采用了二进制嵌入,没有dist前端会报错。

第一步编译前端

cd ui
pnpm run build

编译调试后端

#下载依赖
go mod tidy
#运行
air
#或者
go run *.go 
# 监听localhost:3618端口

前端热加载

cd ui
pnpm run dev
#Vite服务会监听在localhost:3000端口
#Vite转发后端访问到3618端口

访问http://localhost:3000

HELP & SUPPORT

如果你有任何进一步的问题或需要额外的帮助,请随时与我联系!

特别鸣谢

zhaomingcheng01:提出了诸多非常高质量的建议,为k8m的易用好用做出了卓越贡献~

La0jin:提供在线资源及维护,极大提升了k8m的展示效果

eryajf:为我们提供了非常好用的github actions,为k8m增加了自动化的发版、构建、发布等功能

Hosted deployment

A hosted deployment is available on Fronteir AI.

联系我 飞书群

输入图片说明

README fetched from the repository 4 days ago. The original is authoritative.

Questions

About weibaohui/k8m

How do I install weibaohui/k8m?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is weibaohui/k8m safe to use with an AI agent?

Its trust score is 87 out of 100 (excellent). It passes 4 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is weibaohui/k8m still maintained?

Yes — the latest release is v0.26.21 (3 Oct 2026), and the last commit was 5 days ago. The repository has 888 stars and 24 open issues.