OpenSearch is the default log storage and search engine used in the SambaStack monitoring reference architecture. It stores logs and audit information forwarded by Fluent Bit and makes them available for visualization and querying via Grafana or direct API access.Documentation Index
Fetch the complete documentation index at: https://sambanova-systems.mintlify.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Reference Architecture Note: This setup uses third-party components. Versions, defaults, and command syntax may change over time. Address any issues not specific to SambaStack to the vendor or project that owns that component.
Prerequisites
Before you begin, ensure you have the following:- kubectl — Configured with access to your target Kubernetes cluster
- Helm (latest version) — For deploying the OpenSearch chart
- jq — For parsing JSON output during verification
- Storage class — A valid storage class available in your Kubernetes environment for persistent volume provisioning
Deployment Order: OpenSearch should be deployed before Fluent Bit and before Prometheus/Grafana if you want log visualization in Grafana.
Resource requirements
The following are minimum resource recommendations for OpenSearch:| Deployment Type | CPU | Memory | Storage |
|---|---|---|---|
| Single-node (dev/test) | 2 cores | 4 GB | 50 GB |
| Multi-node (production) | 4 cores per node | 8 GB per node | 100 GB per node |
OpenSearch is memory-intensive. For production workloads, allocate at least 50% of available memory to the JVM heap, with a maximum of 32 GB. Set these values in the
opensearch-values.yaml file using the esJavaOpts parameter, for example: esJavaOpts: "-Xmx16g -Xms16g".Architecture overview
In the SambaStack monitoring stack, OpenSearch serves as the central log repository:- Receives logs from Fluent Bit via HTTPS (port 9200)
- Stores logs in time-based indices (default:
logs-7d) - Provides search APIs for Grafana dashboards and direct queries
- Runs as a StatefulSet with persistent storage
Deployment steps
Step 1: Create the monitoring namespace
Start by creating a dedicated namespace for all monitoring components. This namespace is shared by OpenSearch, Fluent Bit, Prometheus, and Grafana. Create a file namedmonitoring-namespace.yaml:
Step 2: Create the admin password secret
OpenSearch requires an initial admin password at install time, which is injected via a Kubernetes secret. First, generate a base64-encoded password:opensearch-initial-admin-password-secret.yaml, replacing the placeholder with your encoded password:
Step 3: Configure Helm values
Create a file namedopensearch-values.yaml to customize the deployment. Replace <your-storage-class> with your cluster’s storage class name:
Configuration Reference
replicas- Setting this value to1is suitable for development and testing. For production high-availability deployments, increase the replica count to at least 3 and ensure your storage class supports multi-AZ provisioning.singleNode- This value should only be set totruewhenreplicasis set to1, similarly for development and testing. For production high-availability deployments, wherereplicas>1, set this tofalseor remove the line entirely.- Note: changing this value on an existing deployment requires recreating the StatefulSet, as it modifies immutable fields.
opensearchJavaOpts- Controls the min and max Java heap size for the OpenSearch JVM. Setting it to"-Xms2g -Xmx2g"pins the heap at exactly 2 GiB. As a rule of thumb, set the heap to roughly 50% of the container memory limit, and never above ~31 GiB. The chart default of 512 MiB is too small once OpenSearch’s bundled plugins (Security, Security Analytics, ML Commons, Query Insights) are loaded, and will lead to OOM errors under normal use.resources- Controls CPU and memory requests (guaranteed allocation) and limits (hard ceiling) for the pod.- Set
limits.memoryto roughly 2× the heap size fromopensearchJavaOptsto leave room for off-heap memory used by Lucene and direct buffers. - Set
requests.memoryequal tolimits.memoryto place the pod in theGuaranteedQoS class, which prevents eviction under node memory pressure. - Set
requests.cputo at least 1 core to ensure baseline performance during index operations, andlimits.cpuhigher (e.g., 2 cores) to allow bursting during merge storms, indexing spikes, and search load..
- Set
Step 4: install OpenSearch
Add the official OpenSearch Helm repository and install the chart:Verification
Once the installation completes, verify that OpenSearch is running correctly.Check pod status
Test API connectivity
Set up port forwarding to access the OpenSearch API locally:Success criteria
Your OpenSearch installation is complete when:- The
opensearch-cluster-master-0pod showsRunningstatus with1/1ready - The OpenSearch API returns valid cluster information via curl
- The
opensearch-initial-admin-passwordsecret exists in themonitoringnamespace
Configuration reference
| Parameter | Default | Description |
|---|---|---|
replicas | 1 | Number of OpenSearch nodes. Use 3+ for production HA |
persistence.enabled | true | Enable persistent storage for indices |
persistence.storageClass | — | Kubernetes storage class for PVCs |
| Index name | logs-7d | Default index created by Fluent Bit (configured in Fluent Bit, not OpenSearch) |
Troubleshooting
Pod stuck in Pending state
Symptom:opensearch-cluster-master-0 remains in Pending status.
Cause: Usually indicates a PersistentVolumeClaim (PVC) cannot be fulfilled.
Solution:
Pod in CrashLoopBackOff
Symptom: Pod repeatedly crashes and restarts. Cause: Often caused by insufficient memory or missing password secret. Solution:Connection refused on port 9200
Symptom:curl returns “Connection refused” even with port-forward active.
Solution:
Next steps
After OpenSearch is running:- Deploy Fluent Bit — Set up log forwarding to populate OpenSearch with cluster logs. See Log Forwarding with Fluent Bit.
- Deploy Prometheus and Grafana — Add metrics collection and visualization. The Grafana deployment includes an OpenSearch datasource for log exploration. See Monitoring with Prometheus and Grafana.

