跳到正文
Skillpedia
部署与云(DevOps)17k · #10765

kubeeye

它能做什么

这个技能帮助 AI 智能体使用 KubeEye,这是一款面向 KubeSphere 的集群巡检工具。适合希望定期检查工作负载、节点和配置的集群管理员。

适用场景

  • ✓当你想在 KubeSphere 中安装或配置 KubeEye 扩展时。
  • ✓当你需要编写检查集群设置或工作负载状态的规则时。
  • ✓当你想进行一次性或定时巡检,并需要查看其报告时。

技能链接

https://github.com/kubesphere/kubesphere/blob/master/skills/kubeeye/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/kubesphere/kubesphere/blob/master/skills/kubeeye/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我设置一个 KubeEye 巡检计划,每晚检查我们的节点,并给我看最新的报告。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会协助安装扩展,并在集群中创建巡检规则和计划。然后它会获取巡检结果,并展示报告供你审阅。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

KubeEye

Overview

KubeEye is a Kubernetes cluster inspection tool for KubeSphere. It detects issues in workloads, nodes, configurations, and components through OPA/Rego policies, PromQL queries, file integrity checks, kernel parameter validation, and systemd health checks. It is installed as a KubeSphere extension.

When to Use

  • Installing or configuring the KubeEye cluster inspection extension in KubeSphere
  • Writing cluster inspection rules (OPA, PromQL, file checks, etc.)
  • Configuring periodic or one-shot inspection tasks
  • Viewing or downloading cluster inspection reports

Architecture

Extension Installation Flow

kspublish (push extension to KubeSphere)
    |
    v
Extension available in KubeSphere marketplace
    |
    v
kubectl apply -f installplan.yaml
    |
    v
KubeEye deployed (3 components)

Runtime Architecture

┌─────────────────────────────────────────────────────────────┐
│                     KubeSphere Extension                    │
│                                                             │
│  ┌─────────────────────┐   ┌─────────────────────────────┐  │
│  │   kubeeye-apiserver │   │  kubeeye-controller-manager │  │
│  │   (Gin REST API)    │   │  (4 CRD Controllers)        │  │
│  │   Port 9090         │   │                             │  │
│  └──────────┬──────────┘   └──────────────┬──────────────┘  │
│             │                              │                 │
│             ▼                              ▼                 │
│  ┌──────────────────────────────────────────────────────┐   │
│  │                    CRDs                              │   │
│  │  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────┐ │   │
│  │  │InspectRule│ │InspectPlan│ │InspectTask│ │Inspect │ │   │
│  │  │          │ │          │ │          │ │Result  │ │   │
│  │  └──────────┘ └──────────┘ └──────────┘ └────────┘ │   │
│  └──────────────────────────────────────────────────────┘   │
│                              │                              │
│                              ▼                              │
│  ┌──────────────────────────────────────────────────────┐   │
│  │              kubeeye-job (K8s Jobs)                  │   │
│  │  OPA ├─ PromQL ├─ FileChange ├─ Sysctl ├─ Systemd   │   │
│  │  NodeInfo ├─ FileFilter ├─ ServiceConnect ├─ Cmd    │   │
│  └──────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘

Note: Cmd in the diagram refers to the customCommand rule type.

CRD Overview

CRD API Version Scope Purpose
InspectRule kubeeye.kubesphere.io/v1alpha2 Cluster Defines inspection rules (OPA, PromQL, file checks, etc.)
InspectPlan kubeeye.kubesphere.io/v1alpha2 Cluster Schedules inspection execution (cron or one-shot)
InspectTask kubeeye.kubesphere.io/v1alpha2 Cluster Tracks a single inspection execution (created by InspectPlan)
InspectResult kubeeye.kubesphere.io/v1alpha2 Cluster Stores inspection results (populated by InspectTask)

CRD Data Flow

User creates InspectRule ──────┐
                               ├──> InspectPlan references InspectRules
User creates InspectPlan ──────┘         |
                                         | (cron trigger or manual)
                                         v
                               InspectTask created by InspectPlanReconciler
                                         |
                                    InspectTaskReconciler:
                                    1. Fetches referenced InspectRules
                                    2. Merges rules per type
                                    3. Creates K8s Jobs (kubeeye-job)
                                    4. Jobs execute rule checks
                                    5. Results accumulated
                                         |
                                         v
                               InspectResult populated with findings
                                         |
                                         v
                               User views results via:
                               - kubectl get inspectresult
                               - API: HTML report / XLSX download

Before You Start

Check if the KubeEye extension is available:

kubectl get extensionversions | grep kubeeye

Expected output: `kubee

常见问题

它能执行哪些类型的检查?

该技能涵盖策略检查、指标查询、文件变更、内核设置、系统服务等。

这个技能只用于安装吗?

不是。它还涵盖编写规则、设置计划和阅读报告。

KubeEye 如何安装?

该技能说明通过安装计划来安装,该计划会被应用到集群中。

详情

作者的原始描述

Use when deploying KubeEye for cluster inspection, creating InspectRule/InspectPlan resources, or retrieving inspection results. Covers InstallPlan-based deployment, OPA/PromQL/FileChange/Sysctl/Systemd/NodeInfo/FileFilter/ServiceConnect/CustomCommand rule types, and report retrieval. Always consult this skill when the user mentions KubeEye, cluster inspection, InspectRule, InspectPlan, or inspection reports.

repo: kubesphere/kubesphere

热度

GitHub 星标
17k
排名
#10765
许可证
—
更新时间
2026/7/14

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能