Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)17k · #10784

opensearch

Skill này làm gì

Skill này giúp agent AI thiết lập OpenSearch, công cụ tìm kiếm và lưu trữ đứng sau khả năng quan sát của KubeSphere. Skill dành cho người vận hành muốn giữ và tìm kiếm log cùng sự kiện ở một nơi.

Khi nào nên dùng

  • ✓Khi bạn muốn cài đặt mở rộng OpenSearch cho ghi log hoặc kiểm toán trong KubeSphere.
  • ✓Khi bạn cần thay đổi cài đặt lưu trữ OpenSearch cho log, sự kiện hoặc thông báo.
  • ✓Khi bạn muốn kiểm tra OpenSearch đã được cài, bật và chạy trên đúng các cụm chưa.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/kubesphere/kubesphere/blob/master/skills/opensearch/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể kiểm tra xem OpenSearch đã được cài và bật trên cụm host của chúng tôi chưa, và cho tôi biết nó chạy trên những cụm nào không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent đọc kế hoạch cài đặt và trạng thái mở rộng bằng kubectl để xem OpenSearch có được bật không và chạy ở đâu. Sau đó nó giúp với các cài đặt cho phần master, data và bảng điều khiển tùy chọn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

OpenSearch lưu những gì?

Nó lưu dữ liệu quan sát như log, sự kiện kiểm toán, sự kiện Kubernetes và lịch sử thông báo.

Những phần nào có thể bật?

Skill liệt kê một node master, các node data, một bảng điều khiển tùy chọn và một curator để xóa các index cũ.

Mặc định dùng bao nhiêu node data?

Skill liệt kê ba bản sao node data là mặc định.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
17k
Vị trí xếp hạng
#10784
Giấy phép
—
Cập nhật
14/7/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự