본문으로 건너뛰기
cccskills
무료GitHub에 공개

opensearch

Install and configure OpenSearch for storing, searching, and analyzing KubeSphere logs, events, audit records, and notification history. Adjust storage and memory, enable a visualization interface, and manage scheduled cleanup of old search indexes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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

연동 도구Kubernetes
설치 방법 보기

이럴 때 유용합니다

  • Preparing storage for logs and event history
  • Enabling OpenSearch Dashboards
  • Adjusting storage capacity and memory
  • Configuring cleanup of old search indexes

포함된 파일(1)

  • SKILL.md11.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

ComponentDescriptionDefault
opensearch-masterMaster node for cluster coordination1 replica
opensearch-dataData nodes for storing indices3 replicas
opensearch-dashboardsWeb UI for visualizing datadisabled
opensearch-curatorScheduled task to clean old indicesenabled

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

ParameterTypeDefaultDescription
opensearch-master.replicasint1Number of master nodes
opensearch-master.opensearchJavaOptsstring"-Xmx512M -Xms512M"JVM options
opensearch-master.resourcesobject-Resource limits/requests
opensearch-data.replicasint3Number of data nodes
opensearch-data.opensearchJavaOptsstring"-Xmx1536M -Xms1536M"JVM options
opensearch-data.resourcesobject-Resource limits/requests
opensearch-data.service.typestringNodePortService type
opensearch-data.service.nodePortint30920NodePort for external access
opensearch-dashboards.enabledboolfalseEnable OpenSearch Dashboards
opensearch-curator.enabledbooltrueEnable index cleanup job

Resource Configuration

opensearch-master:
  replicas: 1
  opensearchJavaOpts: "-Xmx512M -Xms512M"
  resources:
    requests:
      cpu: "100m"
      memory: "512Mi"
    limits:
      cpu: "500m"
      memory: "1Gi"

opensearch-data:
  replicas: 3
  opensearchJavaOpts: "-Xmx2048M -Xms2048M"
  resources:
    requests:
      cpu: "200m"
      memory: "2Gi"
    limits:
      cpu: "2000m"
      memory: "4Gi"
  persistence:
    size: 50Gi
    storageClass: "local-volume"

Operations

Access Target Cluster

⚠️ CRITICAL: You MUST access the target cluster BEFORE checking status or running any kubectl commands below.

❌ DO NOT run kubectl commands without using the target cluster kubeconfig ✅ MUST run: kubectl --kubeconfig=/tmp/<cluster>-kubeconfig ...

Checklist (must complete before any operation):

  • 1. Find target clusters:

    kubectl get installplan opensearch -o jsonpath='{.spec.clusterScheduling.placement.clusters}'
    
  • 2. Get cluster kubeconfig:

    kubectl get cluster <cluster-name> -o jsonpath='{.spec.connection.kubeconfig}' | base64 -d > /tmp/<cluster-name>-kubeconfig
    
  • 3. Use this kubeconfig for ALL subsequent commands

Note: Replace <cluster-name> with the actual cluster name. Use spec.connection.kubeconfig for imported clusters.

Check Status

⚠️ REQUIRED: Complete Access Target Cluster checklist FIRST

# Extension status
kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get extension opensearch

# InstallPlan status
kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get installplan opensearch

Get Pods

⚠️ REQUIRED: Complete Access Target Cluster checklist FIRST

# All pods
kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get pods -n kubesphere-logging-system -l app.kubernetes.io/instance=opensearch-agent

# By component
kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get pods -n kubesphere-logging-system -l app.kubernetes.io/name=opensearch-master
kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get pods -n kubesphere-logging-system -l app.kubernetes.io/name=opensearch-data

# Status
kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get pods -n kubesphere-logging-system -l app.kubernetes.io/instance=opensearch-agent -o wide

External Endpoint

⚠️ REQUIRED: Complete Access Target Cluster checklist FIRST

OpenSearch uses NodePort (default: 30920) to expose service externally.

# Get NodePort service
kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get svc -n kubesphere-logging-system opensearch-cluster-data

# Get node IP
kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}'

# Access OpenSearch externally
# URL: https://<node-ip>:30920
curl -k -u admin:admin "https://<node-ip>:30920/_cluster/health"

Output Contract (For Other Skills)

⚠️ This section defines what information this skill provides to other skills

When OpenSearch is successfully deployed, other skills can retrieve:

FieldExample ValueDescription
endpointhttps://127.0.0.1:30920Full URL for Vector sink
nodePort30920NodePort number
nodeIP127.0.0.1Node internal IP
auth.useradminDefault username
auth.passwordadminDefault password

How other skills should get this info:

  1. Find which cluster OpenSearch was deployed to:

    kubectl get installplan opensearch -o jsonpath='{.spec.clusterScheduling.placement.clusters}'
    
  2. Get cluster kubeconfig:

    kubectl get cluster <cluster-name> -o jsonpath='{.spec.connection.kubeconfig}' | base64 -d > /tmp/<cluster-name>-kubeconfig
    
  3. Get OpenSearch endpoint:

    # NodePort
    NODE_PORT=$(kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get svc -n kubesphere-logging-system opensearch-cluster-data -o jsonpath='{.spec.ports[?(@.port==9200)].nodePort}')
    
    # Node IP
    NODE_IP=$(kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}')
    
    # Full endpoint
    echo "https://${NODE_IP}:${NODE_PORT}"
    

Update Configuration

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-data:
      replicas: 5
      opensearchJavaOpts: "-Xmx4096M -Xms4096M"
    opensearch-dashboards:
      enabled: true
  clusterScheduling:
    placement:
      clusters:
        - host

Uninstall

Uninstall from all clusters:

kubectl delete installplan opensearch

Uninstall from specific cluster:

To remove OpenSearch from a specific cluster, update the InstallPlan by removing that cluster from clusterScheduling.placement.clusters:

apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
  name: opensearch
spec:
  extension:
    name: opensearch
    version: <VERSION>
  enabled: true
  upgradeStrategy: Manual
  config: |
    opensearch-data:
      replicas: 3
  clusterScheduling:
    placement:
      clusters:
        - <REMAINING_CLUSTERS>  # Remove the cluster you want to uninstall from

Troubleshooting

⚠️ REQUIRED: Complete Access Target Cluster checklist FIRST

Pod Issues

kubectl --kubeconfig=/tmp/<cluster>-kubeconfig get pods -n kubesphere-logging-system -l app.kubernetes.io/instance=opensearch-agent

# Pod events
kubectl --kubeconfig=/tmp/<cluster>-kubeconfig describe pods -n kubesphere-logging-system -l app.kubernetes.io/instance=opensearch-agent

OpenSearch Health

⚠️ REQUIRED: Complete Access Target Cluster checklist FIRST

# Cluster health
curl -k -u admin:admin "https://<node-ip>:30920/_cluster/health"

# List indices
curl -k -u admin:admin "https://<node-ip>:30920/_cat/indices"

Common Issues

IssueSolution
Pods not startingCheck node resources and storage availability
Out of memoryIncrease JVM heap size
Cannot connectCheck NodePort firewall rules
Index storage fullIncrease PVC size or enable Curator

Notes

  1. Resource Requirements: OpenSearch requires significant CPU and memory
  2. Storage: Data nodes use persistent storage
  3. NodePort: Default port is 30920
  4. Multi-cluster: Can be deployed to specific clusters

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Manage FrontendExtension resources in frontend-forge, from creation and package generation to downloading, publishing, and unpublishing. Inspect generated files, Kubernetes jobs, and status information to diagnose packaging or publishing failures.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Create or update a FrontendExtension
  • Rebuild and download an extension package
  • Publish, unpublish, or remove an extension
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

Operate FrontendIntegration resources from existing YAML definitions using kubectl, the Kubernetes command-line tool. Manage updates and enabled state, inspect build output, troubleshoot failures, and install or manage the frontend-forge extension.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Create a FrontendIntegration from existing YAML
  • Update, enable, or disable a FrontendIntegration
  • Inspect build output and troubleshoot failures
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

Generate FrontendIntegration YAML for frontend-forge from a simplified configuration containing one menu and one or more pages. Define resource tables or embedded iframe pages, with the bundled generator expanding menu placements into the required YAML structure.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Generating integration YAML for a CRD resource table
  • Defining an embedded iframe page
  • Converting a single-menu configuration into canonical YAML
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

kubeeye

무료

Set up KubeEye in KubeSphere to inspect Kubernetes clusters. Define checks for configurations, nodes, and services, schedule recurring or one-time inspections, and retrieve findings as HTML or spreadsheet reports.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Install KubeEye for cluster inspections
  • Create checks for node health and configuration
  • Schedule recurring cluster inspections
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

Inspect KubeSphere clusters with read-only commands. List clusters, view detailed configuration, identify host and member roles, and review connection types, readiness indicators, and KubeSphere and Kubernetes versions without changing cluster resources.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • List clusters registered in KubeSphere
  • Check cluster readiness
  • Review KubeSphere and Kubernetes versions
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

Understand KubeSphere architecture and call its APIs with a script that handles authentication. This skill also directs cluster, user, workspace, and extension management requests to the relevant specialist skills.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Understand KubeSphere core components
  • Choose API paths for Kubernetes and KubeSphere operations
  • Send API requests to a specific member cluster
kubesphere/kubesphere1.7만2026년 7월 15일 업데이트

kubesphere의 스킬 모두 보기

이 스킬의 문제 신고