opensearch
它能做什么
这个技能帮助 AI 智能体设置 OpenSearch,它是 KubeSphere 可观测性背后的搜索和存储引擎。适合希望把日志和事件集中保存并可搜索的运维人员。
适用场景
- ✓当你想为 KubeSphere 日志或审计安装 OpenSearch 扩展时。
- ✓当你需要更改日志、事件或通知的 OpenSearch 存储设置时。
- ✓当你想检查 OpenSearch 是否已在正确的集群上安装、启用并运行时。
技能链接
https://github.com/kubesphere/kubesphere/blob/master/skills/opensearch/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查 OpenSearch 是否已在我们的主集群上安装并启用,并告诉我它运行在哪些集群上。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会使用 kubectl 读取安装计划和扩展状态,以确认 OpenSearch 是否已启用以及运行位置。然后它会协助设置其主节点、数据节点以及可选仪表板部分的安装参数。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
OpenSearch Extension
Overview
OpenSearch is a distributed search and analytics engine built into the KubeSphere WizTelemetry Observability Platform. It is used to store, search, and analyze observability data including logs, auditing events, K8s events, and notification history.
When to Use
- Installing OpenSearch cluster for KubeSphere observability extensions
- Configuring OpenSearch storage for logging, events, auditing, and notifications
- Managing OpenSearch Dashboard and Curator components
Components
| Component | Description | Default |
|---|---|---|
| opensearch-master | Master node for cluster coordination | 1 replica |
| opensearch-data | Data nodes for storing indices | 3 replicas |
| opensearch-dashboards | Web UI for visualizing data | disabled |
| opensearch-curator | Scheduled task to clean old indices | enabled |
Prerequisites
Check Installation Status
# Check if OpenSearch is installed
kubectl get installplan opensearch -o jsonpath='{.spec.enabled}'
# Get installed version
kubectl get extension opensearch -o jsonpath='{.status.installedVersion}'
# Get target clusters
kubectl get installplan opensearch -o jsonpath='{.spec.clusterScheduling.placement.clusters}'
Returns:
"true"- installed and enabled"false"- installed but disabled- Empty/Error - not installed
Get Available Clusters
kubectl get clusters -o jsonpath='{.items[*].metadata.name}'
Confirm Target Clusters (MUST DO)
⚠️ CRITICAL: Do Not guess.
⚠️ CRITICAL: DO NOT proceed until target clusters are determined.
- If user explicitly specified target clusters in the request → Use those clusters directly
- If user did NOT specify target clusters → You MUST ask user to confirm which clusters to deploy to
Ask user (if not specified):
Available clusters: host, dev
Which clusters do you want to deploy OpenSearch to?
Get Latest Version
MUST do this to get the latest version:
kubectl get extensionversions -l kubesphere.io/extension-ref=opensearch -o jsonpath='{range .items[*]}{.spec.version}{"\n"}{end}' | sort -V | tail -1
Installation
⚠️ CRITICAL: InstallPlan metadata.name MUST be opensearch. DO NOT use any other name.
Use the latest version obtained from "Get Latest Version" step.
Minimal Installation
apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
name: opensearch
spec:
extension:
name: opensearch
version: <VERSION> # From Get Latest Version step
enabled: true
upgradeStrategy: Manual
clusterScheduling:
placement:
clusters:
- host
With OpenSearch Dashboard
apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
name: opensearch
spec:
extension:
name: opensearch
version: <VERSION> # From Get Latest Version step
enabled: true
upgradeStrategy: Manual
config: |
opensearch-dashboards:
enabled: true
clusterScheduling:
placement:
clusters:
- host
Disable Curator
apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
name: opensearch
spec:
extension:
name: opensearch
version: <VERSION> # From Get Latest Version step
enabled: true
upgradeStrategy: Manual
config: |
opensearch-curator:
enabled: false
clusterScheduling:
placement:
clusters:
- host
Configuration
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
opensearch-master.replicas |
int | 1 | Number of master nodes |
opensearch-master.opensearchJavaOpts |
string | "-Xmx512M -Xms512M" | JVM options |
opensearch-master.resources |
object | - | Resource limits/requests |
opensearch-data.replicas |
int | 3 | Number of data nodes |
opensearch-data.opensearchJavaOpts |
string | "-Xmx1536M -Xms1536M" | JVM options |
opensearch-data.resources |
object | - | Resource limits/requests |
opensearch-data.service.type |
string | NodePort | Service type |
opensearch-data.service.nodePort |
int | 30920 | NodePort for external access |
opensearch-dashboards.enabled |
bool | false | Enable OpenSearch Dashboards |
opensearch-curator.enabled |
bool | true | Enable index cleanup job |
Resource Configuration
opensearch-master:
replicas: 1
opensearchJavaOpts: "-Xmx512M -Xms512M"
resources:
requests:
cpu: "100m"
memory
常见问题
OpenSearch 存储什么?
它存储可观测性数据,例如日志、审计事件、Kubernetes 事件和通知历史。
哪些部分可以开启?
该技能列出了主节点、数据节点、可选仪表板,以及用于删除旧索引的 curator。
默认使用多少个数据节点?
该技能列出的默认数据节点副本数为三个。
详情
作者的原始描述
Use when installing or configuring the OpenSearch extension for KubeSphere, which provides distributed search and analytics engine for storing logs, events, auditing, and notification history
repo: kubesphere/kubesphere
热度
- GitHub 星标
- 17k
- 排名
- #10784
- 许可证
- —
- 更新时间
- 2026/7/14
评论
- …
同一仓库的更多技能
frontend-forge-fe-operations
17k帮你的智能体在 KubeSphere 中管理 FrontendExtension 资源,包括构建、发布和调试。
frontend-forge-fi-operations
17k帮你的智能体在 KubeSphere 中创建、更新、启用、禁用和检查 FrontendIntegration 资源及 frontend-forge 扩展。
frontend-integration-yaml
17k帮你的智能体为一个菜单及其一个或多个页面,创建可直接提交的 FrontendIntegration YAML。
kubeeye
17k帮你的智能体安装 KubeEye,设置集群巡检规则和计划,并阅读巡检报告。