Before you dig into the details of this technical guide, have you tried asking OpsGPT?
You'll receive concise answers that will help streamline your Elasticsearch/OpenSearch operations.
Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch/ OpenSearch operation.
Before you dig into the details of this guide, have you tried asking OpsGPT? You’ll receive concise answers that will help streamline your OpenSearch/Elasticsearch operation.
Try OpsGPT now for step-by-step guidance and tailored insights into your search operation.
To manage all aspects of your OpenSearch operation, you can use Opster’s Management Console (OMC). The OMC makes it easy to orchestrate and manage OpenSearch in any environment. Using the OMC you can deploy multiple clusters, configure node roles, scale cluster resources, manage certificates and more – all from a single interface, for free. Check it out here.
You can also start a free trial of Opster’s full platform, AutoOps, to improve performance, ensure stability and reduce your hardware costs 💪
In this article, we will explain all the steps needed to spin up an OpenSearch cluster on Kubernetes using HELM charts. For the sake of these instructions, the assumption is that readers are already familiar with raising and managing Kubernetes clusters.
If you aren’t familiar with this, here are some useful links:
What are Helm charts?
Helm is the best way to find, share, and use software built for Kubernetes. In short, it makes the task of managing and maintaining kubernetes deployments smooth and simple.
A chart is a collection of files that describe a related set of Kubernetes resources, from something as simple as a single pod to something as complex as full system architecture.
You can explore all the available charts in the Artifacts Hub.
Prerequisites for this installation method
- Kubernetes should already be installed.
- The helm chart deploys a 3 nodes cluster, therefore, 8GB RAM is recommended for this deployment.
- Install HELM
- Add HELM OpenSearch repo
1. Install HELM
Depending on your system you can use the common package managers (homebrew, chocolatey, apt, snap, etc ..), execute a binary file, from an installation script, or build from the source. You can visit Helm | Installing Helm for more information.
brew install helm
choco install kubernetes-helm
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add - sudo apt-get install apt-transport-https --yes echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list sudo apt-get update sudo apt-get install helm
2. Add HELM Opensearch repo
$ helm repo add OpenSearch https://opensearch-project.github.io/helm-charts/
$ helm repo update
You can confirm the repo was added by running:
helm search repo opensearch
The output should look like this:
To deploy, run:
helm install helm-opensearch opensearch/opensearch
The output should look like this:
Watch the cluster members:
kubectl get pods --namespace=default -l app.kubernetes.io/component=opensearch-cluster-master -w
- Deploy with custom parameters
- Enter into the bash
- Update existing HELM charts
- Uninstall OpenSearch deployment
1. Deploy with custom parameters
To deploy with custom parameters you have two alternatives:
- Using values helm property
- Building the helm charts from the OpenSearch tarball file.
Using values helm property
To deploy with custom parameters using values help property, run the following helm command:
$ helm upgrade --wait --timeout=$(TIMEOUT) --namespace $(NAMESPACE) --install $(PREFIX)-master opensearch/opensearch --values master.yaml --version $(VERSION)
The master.yaml file referenced in the command can be taken from this link: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch/values.yaml
Building the helm charts from the OpenSearch tarball file
Clone the helm-charts repo:
git clone https://github.com/opensearch-project/helm-charts
Change to the OpenSearch folder:
Package Helm chart (note the dot at the end):
helm package .
Deploy generated package, pass the custom values using a YAML file:
helm install --values=customvalues.yaml opensearch-1.2.0.tgz
2. Enter into the bash
Get the pods:
kubectl get pods
Access to the shell using the pod name:
kubectl exec -it opensearch-cluster-master-0 -- /bin/bash
3. Update existing HELM charts:
If you already installed the chart you can update to the last version:
helm repo update
4. Uninstall OpenSearch deployment
Next, you need to uninstall the OpenSearch deployment. Start by finding the deployment name:.
You can then delete using that name:
helm delete opensearch-1-1629223146
Helm is a Kubernetes package manager that can help you manage your OpenSearch installations, making your deployments reproducible and version managed.
With Helm you can quickly deploy a standard configured cluster, but also set your own parameters for more complex scenarios.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?