Deploy OpenSearch clusters on Kubernetes using the official Helm charts. This guide covers installation, configuration, and production deployment of OpenSearch and OpenSearch Dashboards.
Overview
The OpenSearch project maintains official Helm charts for deploying:
- opensearch - The core search and analytics engine
- opensearch-dashboards - The visualization and management interface
These charts deploy OpenSearch as StatefulSets with configurable replicas, persistence, and security settings.
Note: For automated lifecycle management, scaling, and advanced orchestration, consider the OpenSearch Kubernetes Operator instead.
Prerequisites
- Kubernetes 1.19+
- Helm 3.x
kubectlconfigured with cluster access- Persistent volume provisioner (recommended)
Quick Start
Add the Helm Repository
helm repo add opensearch https://opensearch-project.github.io/helm-charts
helm repo update
Install OpenSearch
For OpenSearch 2.12.0+, you must provide an initial admin password:
helm install opensearch opensearch/opensearch \
--set singleNode=true \
--set extraEnvs[0].name=OPENSEARCH_INITIAL_ADMIN_PASSWORD \
--set extraEnvs[0].value=MyStr0ngP@ssword!
For a multi-node cluster:
helm install opensearch opensearch/opensearch \
--set replicas=3 \
--set extraEnvs[0].name=OPENSEARCH_INITIAL_ADMIN_PASSWORD \
--set extraEnvs[0].value=MyStr0ngP@ssword!
Install OpenSearch Dashboards
helm install dashboards opensearch/opensearch-dashboards
Verify Installation
kubectl get pods -l app.kubernetes.io/name=opensearch
kubectl get svc -l app.kubernetes.io/name=opensearch
Configuration
Common Values
Create a values.yaml file for customization:
# OpenSearch values.yaml
replicas: 3
resources:
requests:
cpu: "1000m"
memory: "2Gi"
limits:
cpu: "2000m"
memory: "4Gi"
persistence:
enabled: true
size: 100Gi
storageClass: "standard"
extraEnvs:
- name: OPENSEARCH_INITIAL_ADMIN_PASSWORD
value: "MyStr0ngP@ssword!"
config:
opensearch.yml: |
cluster.name: my-cluster
network.host: 0.0.0.0
plugins.security.ssl.http.enabled: true
Install with custom values:
helm install opensearch opensearch/opensearch -f values.yaml
Node Roles
Configure dedicated node types:
# Master nodes
masterService: "opensearch-cluster-master"
nodeGroup: "master"
roles:
- master
# Data nodes (separate release)
nodeGroup: "data"
roles:
- data
- ingest
Security Configuration
Disable security for development (not recommended for production):
config:
opensearch.yml: |
plugins.security.disabled: true
Use custom certificates:
secretMounts:
- name: certs
secretName: opensearch-certs
path: /usr/share/opensearch/config/certs
JVM Settings
opensearchJavaOpts: "-Xms2g -Xmx2g"
Set JVM heap to 50% of container memory, not exceeding 32GB.
Production Deployment
Multi-Node Cluster
Deploy separate node pools for production:
# Master nodes
helm install opensearch-master opensearch/opensearch \
-f master-values.yaml \
--set nodeGroup=master \
--set roles='{master}'
# Data nodes
helm install opensearch-data opensearch/opensearch \
-f data-values.yaml \
--set nodeGroup=data \
--set roles='{data,ingest}'
# Coordinating nodes
helm install opensearch-coord opensearch/opensearch \
-f coord-values.yaml \
--set nodeGroup=coordinating \
--set roles='{}'
Resource Recommendations
| Node Type | CPU | Memory | Storage |
|---|---|---|---|
| Master | 2 cores | 4Gi | 20Gi |
| Data | 4+ cores | 16Gi+ | 500Gi+ |
| Coordinating | 2 cores | 8Gi | 20Gi |
Pod Anti-Affinity
Spread pods across nodes:
antiAffinity: "hard"
Pod Disruption Budget
podDisruptionBudget:
enabled: true
minAvailable: 2
Accessing OpenSearch
Port Forward
kubectl port-forward svc/opensearch-cluster-master 9200:9200
Test Connection
curl -k -u admin:MyStr0ngP@ssword! https://localhost:9200
Dashboards Access
kubectl port-forward svc/dashboards-opensearch-dashboards 5601:5601
Open https://localhost:5601 in your browser.
Upgrading
helm repo update
helm upgrade opensearch opensearch/opensearch -f values.yaml
For major version upgrades, review the OpenSearch documentation for migration steps.
Uninstall
# Remove releases
helm uninstall opensearch
helm uninstall dashboards
# Remove persistent data (optional)
kubectl delete pvc -l app.kubernetes.io/name=opensearch
Helm Chart vs Kubernetes Operator
| Feature | Helm Chart | Kubernetes Operator |
|---|---|---|
| Deployment complexity | Simple | More setup required |
| Automated scaling | Manual | Automatic |
| Rolling upgrades | Basic | Smart drain support |
| Security management | Manual | CRD-based automation |
| Multi-cluster | Separate releases | Single CRD per cluster |
Choose Helm charts for simpler deployments. Use the Kubernetes Operator for production environments requiring automated lifecycle management.
Enterprise Support
Need help with your OpenSearch deployment? Our team provides enterprise-grade support for OpenSearch clusters, including architecture planning, performance optimization, security hardening, and 24/7 incident response.
Learn more about OpenSearch Enterprise Support