# Stackable Operator for OpenSearch

> Stackable Operator for OpenSearch manages OpenSearch clusters on Kubernetes for data ingestion and search

-   [GitHub](https://github.com/stackabletech/opensearch-operator/)

-   [Feature Tracker](https://features.stackable.tech/unified)

-   [CRD documentation](https://crds.stackable.tech/opensearch-operator/26.7.0/)


The Stackable operator for [OpenSearch](https://opensearch.org/) deploys and manages OpenSearch clusters on Kubernetes. OpenSearch is a powerful search and analytics engine built on Apache Lucene. This operator helps you manage your OpenSearch instances on Kubernetes efficiently.

> **Important:** If you intend to upgrade an existing OpenSearchCluster from a previous SDP version, please refer to the [SDP upgrade notes](https://docs.stackable.tech/home/stable/opensearch/usage-guide/upgrade/index.md) for detailed guidance.

## Getting started

Get started using OpenSearch with the Stackable operator by following the [Getting started](https://docs.stackable.tech/home/stable/opensearch/getting_started/index.md). It guides you through installing the operator, connecting to your OpenSearch instance and using the REST API to ingest and search for data.

## Operator model

The operator manages the _OpenSearchCluster_ resource. It creates a number of different Kubernetes resources based on this [custom resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).

### Custom resources

The OpenSearchCluster is the resource for the configuration of the OpenSearch instance. The resource defines only one [role](https://docs.stackable.tech/home/stable/concepts/stacklet/index.md), the `nodes`. The various configuration options are explained in the [Usage guide](https://docs.stackable.tech/home/stable/opensearch/usage-guide/index.md). It helps you tune your cluster to your needs by configuring [resource usage](https://docs.stackable.tech/home/stable/opensearch/usage-guide/storage-resource-configuration/index.md) and more.

### Kubernetes resources

Based on the custom resources you define, the operator creates ConfigMaps, StatefulSets, Services and so on.

![A diagram depicting the Kubernetes resources created by the operator](https://docs.stackable.tech/home/stable/opensearch/_images/opensearch_overview.drawio.svg)

The diagram above depicts all the Kubernetes resources created by the operator, and how they relate to each other.

What should be highlighted, is the [discovery ConfigMap](https://docs.stackable.tech/home/stable/opensearch/reference/discovery/index.md) which is named the same as the OpenSearchCluster. It references the Service that should be used to connect to the cluster.

For every [role group](https://docs.stackable.tech/home/stable/concepts/stacklet/index.md) you define, the operator deploys OpenSearch as a StatefulSet with the amount of replicas defined in the role group. The pods of a StatefulSet use the configuration from the role group ConfigMap, i.e. they all use the same OpenSearch node roles, e.g. `cluster-manager` or `data`, and [resource configurations](https://docs.stackable.tech/home/stable/opensearch/usage-guide/storage-resource-configuration/index.md). If you want dedicated `cluster-manager` and `data` nodes, you just define two role groups with according configurations as described in [Assigning roles to nodes](https://docs.stackable.tech/home/stable/opensearch/usage-guide/node-roles/index.md).

## Supported versions

The Stackable operator for OpenSearch currently supports the OpenSearch versions listed below. To use a specific OpenSearch version in your OpenSearchCluster, you have to specify an image - this is explained in the [Product image selection](https://docs.stackable.tech/home/stable/concepts/product-image-selection/index.md) documentation. The operator also supports running images from a custom registry or running entirely customized images; both of these cases are explained under [Product image selection](https://docs.stackable.tech/home/stable/concepts/product-image-selection/index.md) as well.

-   3.1.0 (LTS)

-   3.6.0

-   3.4.0 (deprecated)


## Useful links

-   The [opensearch-operator](https://github.com/stackabletech/opensearch-operator/) GitHub repository

-   The operator feature overview in the [feature tracker](https://features.stackable.tech/unified)

-   The [OpenSearchCluster](https://crds.stackable.tech/26.7.0/opensearch.stackable.tech/opensearchcluster/v1alpha1/) CRD documentation
