opensearch-k8s-operator icon indicating copy to clipboard operation
opensearch-k8s-operator copied to clipboard

OpenSearch Kubernetes Operator

build test release Golang Lint

OpenSearch-k8s-operator

The Kubernetes OpenSearch Operator is used for automating the deployment, provisioning, management, and orchestration of OpenSearch clusters and OpenSearch dashboards.

Getting started

The Operator can be easily installed using helm on any CNCF-certified Kubernetes cluster. Please refer to the User Guide for installation instructions.

Roadmap

The full roadmap is available in the Development plan.

Currently planned features:

  • [x] Deploy a new OS cluster.
  • [x] Ability to deploy multiple clusters.
  • [x] Spin up OS dashboards.
  • [x] Configuration of all node roles (master, data, coordinating..).
  • [x] Scale the cluster resources (manually), per nodes' role group.
  • [x] Drain strategy for scale down.
  • [x] Version updates.
  • [x] Change nodes' memory allocation and limits.
  • [x] Secured installation features.
  • [x] Certificate management.
  • [x] Rolling restarts - through API.
  • [x] Scaling nodes' disks - increase disk size.
  • [x] Cluster configurations and nodes' settings updates.
  • [ ] Operator Monitoring, with Prometheus and Grafana.
  • [ ] Auto scaler based on usage, load, and resources.
  • [ ] Control shard balancing and allocation: AZ/Rack awareness, Hot/Warm.

Installation

The Operator can be easily installed using Helm:

  1. Add the helm repo: helm repo add opensearch-operator https://opster.github.io/opensearch-k8s-operator/
  2. Install the Operator: helm install opensearch-operator opensearch-operator/opensearch-operator

Development

Running the Operator locally

  • Clone the repo and go to the opensearch-operator folder.
  • Run make build manifests to build the controller binary and the manifests
  • Start a Kubernetes cluster (e.g. with k3d or minikube) and make sure your ~/.kube/config points to it
  • Run make install to create the CRD in the kubernetes cluster
  • Start the Operator by running make run

Note: use GO 1.17 version

Now you can deploy an Opensearch cluster.

Go to opensearch-operator and use opensearch-cluster.yaml as a starting point to define your cluster. Then run:

kubectl apply -f opensearch-cluster.yaml

In order to delete the cluster, you just delete your OpenSearch cluster resource. This will delete the cluster and all of its resources.

kubectl delete -f opensearch-cluster.yaml

Installation Tutorial and Demo

Watch the video

Contributions

We welcome contributions! See how you can get involved by reading CONTRIBUTING.md.