# Opensearch

Use when installing or configuring the OpenSearch extension for KubeSphere, which...

- Repository: https://github.com/kubesphere/kubesphere (17074 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-07-15
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add kubesphere/kubesphere --skill opensearch -g -a claude-code -y`
Codex: `npx skills add kubesphere/kubesphere --skill opensearch -g -a codex -y`
Cursor: `npx skills add kubesphere/kubesphere --skill opensearch -g -a cursor -y`
Gemini CLI: `npx skills add kubesphere/kubesphere --skill opensearch -g -a gemini-cli -y`

## Description

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

```bash
# 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

```bash
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

The rest: https://github.com/kubesphere/kubesphere/blob/HEAD/skills/opensearch/SKILL.md
