Skip to main content

Overview

OpenSearch is an open-source distributed search and analytics engine for full-text search, log analytics and security monitoring. This template deploys a multi-node OpenSearch cluster with the security plugin always on: a login, TLS on every connection, and a security audit log. Security Analytics (Sigma-rule detectors, findings and alerts) is included, so the cluster doubles as a self-hosted SIEM; see also the Wazuh template for endpoint security. Dashboards is on by default, with an optional public login page, an optional demo log pipeline with a sample detector, and optional snapshots to AWS S3 or GCS.
This template deploys into an existing GVC that you already have. It does not create one, and it runs in the locations that GVC already has.

What Gets Created

Prerequisites

Two dictionary secrets must exist before you install.
1

Create the credentials secret

It holds the admin password, the password Dashboards uses to reach OpenSearch, and the Dashboards session-cookie key (32 or more characters).
Set security.credentialsSecretName to this name. Read the admin password back with cpln secret reveal CREDENTIALS_SECRET_NAME -o yaml.
2

Create the certificate authority secret

The nodes sign their own certificates from a CA you provide, stored as a base64 PKCS#12 plus its passphrase.
Set security.caSecretName to this name. Keep ca.crt: your applications use it to verify the cluster’s certificate. Store ca.key safely or delete it; the secret already holds the key.
If either secret is missing, the deployment wedges silently: the nodes never start and cpln logs shows nothing. The missing secret is named only in status.versions[].message, which you read with cpln workload get-deployments RELEASE_NAME-opensearch --gvc GVC_NAME -o yaml.
Snapshot backups also need a bucket and a Control Plane Cloud Account. See Backing Up.

Installation

Install the latest version into an existing GVC, naming your two secrets:
To install using another method, follow the instructions for your preferred tool:

UI

Browse, install, and manage templates visually

CLI

Manage templates from your terminal

Terraform

Declare templates in your Terraform configurations

Pulumi

Declare templates in your Pulumi programs

Configuration

Each subsection shows the shipped defaults for one area of values.yaml.

Cluster

replicas must be odd so the cluster can form a quorum; an even value is rejected when the chart renders.

Resources

Per-node limits and reservations. OpenSearch is memory-sensitive; raise maxMemory before raising CPU.

Volume Set

One volume per node. Enable autoscaling to let each volume grow as indices fill it.

Security

The two prerequisite secrets. Both are required; the chart refuses to render without them.

Internal Access

Controls which workloads may reach OpenSearch on port 9200. External inbound access is closed and is not configurable. Every request still needs credentials.
With workload-list, list your additional clients only; the chart always allows its own workloads (the nodes, Dashboards, the demo and backup jobs).

Dashboards

The OpenSearch Dashboards UI, with a login. It is private by default; reach it with cpln port-forward as shown in Connecting. Set publicAccess.enabled: true to publish the login page on an HTTPS *.cpln.app endpoint.

Demo Logs

A sample log generator with a Fluent Bit sidecar that ships JSON logs into a demo-logs index, plus a one-time setup job that creates the index template, makes demo-logs* the default index pattern in Dashboards, and creates a sample Security Analytics detector. The setup job needs dashboard.enabled: true.

Backup

Scheduled snapshots to AWS S3 or GCS. Complete the provider steps in Backing Up before setting enabled: true. When provider is aws, aws.bucket, aws.region, aws.cloudAccountName and aws.policyName are required; when it is gcp, gcp.bucket and gcp.cloudAccountName are required. Any other provider value is rejected when the chart renders.

Connecting

Verify the cluster from any workload in the same GVC, with ca.crt available there:
A healthy default install reports "status" : "green" and "number_of_nodes" : 3.

First Run

In Dashboards, log in as admin with the password from your credentials secret. Dashboards opens in the Global tenant, where saved objects are shared with other users; change the default under Security > Tenants > Configure.

Using Security Analytics

Security Analytics runs Sigma rules over your log indices and records findings and alerts.
  1. Ship logs into an index (Fluent Bit, Logstash, OpenTelemetry or the bulk API).
  2. In Dashboards, open Security Analytics > Detectors > Create detector, choose the index and a log type (CloudTrail, VPC Flow, DNS, Windows and others ship with prepackaged rules), and map the fields it asks for.
  3. Findings appear under Findings; add a trigger with a notification channel to be alerted.
With demoLogs.enabled: true, the detector demo-auth-failures watches the demo-logs index for Invalid authentication token messages and produces findings from the generated logs.

Operations

Backing Up

The template takes snapshots with OpenSearch’s own snapshot API. When backup.enabled: true, each node installs the repository-s3 or repository-gcs plugin at startup, and the RELEASE_NAME-backup-setup job registers a snapshot repository named backup-repo plus a snapshot policy that follows backup.schedule and backup.retention.
Enable backups at install time if you can. Turning them on later works, but every node has to restart to install the repository plugin before the repository can be registered. See Troubleshooting.
Set up your provider first.
1

Create the bucket

Create an S3 bucket. Set backup.aws.bucket to its name and backup.aws.region to its region.
2

Create or choose a Cloud Account

If you do not have one, follow Create a Cloud Account. Set backup.aws.cloudAccountName to its name.
3

Create the IAM policy

Create an IAM policy with the following JSON, replacing YOUR_BUCKET_NAME. Set backup.aws.policyName to the policy’s name.
Keep both Resource ARNs: listing authorizes against the bucket, object actions against YOUR_BUCKET_NAME/*.
4

Enable backups

Set backup.enabled: true and backup.provider: aws, then install or upgrade the release.
Check that the setup job finished by reading its logs:
Once it has completed, set backup.remove_setup_workload: true and upgrade the release to remove the setup workload. Scheduled snapshots continue without it. From a workload in the same GVC, set OS=https://RELEASE_NAME-opensearch.GVC_NAME.cpln.local:9200 and AUTH="admin:ADMIN_PASSWORD", then take or inspect snapshots:

Restoring a Backup

OpenSearch snapshots are raw index segment files, not dumps; restore them through the snapshot API from the backup-repo repository, using OS and AUTH as above. Always leave out .opendistro_security: it holds the live users and roles. Into a new cluster — restore your own indices by name or pattern (INDEX_PATTERN, for example logs-*). Every cluster this template creates already has its .-prefixed system indices, .kibana* and security-auditlog-*, and an open index cannot be restored over, so never restore *:
Over existing indices — an open index cannot be restored into, so close the indices you restore first, restore, then reopen. Never close _all: that closes the security index and locks everyone out.
Alongside existing indices — restore under new names and leave live data untouched. This is the safest option on a cluster in use:
Watch progress with curl --cacert ca.crt -u "$AUTH" "$OS/_cat/recovery?v&active_only=true". To restore from Dashboards Snapshot Management, pick specific indices, choose a prefix or regex rename (Do not rename still adds restored_), and uncheck Restore cluster state under Advanced options; with security on, restoring cluster state or system indices is refused. Take snapshot snapshots every index whatever you select; use a snapshot policy to snapshot chosen indices.

Upgrading from 1.0.x

Version 2.0.0 turns the security plugin on, so every client changes. Your indices are kept.
If you ran 1.0.0 or 1.0.1 with demoLogs.enabled: true, treat every secret in that organization as having been readable. The demo-logs policy in those versions granted reveal on every secret in the org. Upgrading removes the grant but does not undo past access: review what the organization holds and rotate anything sensitive.
  1. Create both prerequisite secrets.
  2. Run cpln helm upgrade to 2.0.0 with security.credentialsSecretName and security.caSecretName set:
    The nodes restart one at a time. Old and new nodes cannot talk to each other, so the API is unavailable while the first nodes come up on TLS, and plain-HTTP clients fail from the first restart.
  3. Point every client at https://, log in as admin (or a user you create), and trust ca.crt.
  4. Saved objects from 1.0.x are in the Global tenant of Dashboards.
If a node or Dashboards is still waiting several minutes after the upgrade, run cpln workload force-redeployment WORKLOAD_NAME --gvc GVC_NAME: new identities and grants can take a few minutes to apply.

Rotating Passwords

The admin and kibanaserver passwords come from the credentials secret at every node start. Change the value in the secret:
Then force a redeployment of every workload that uses it:
With the demo pipeline on, also redeploy RELEASE_NAME-demo-log-generator. The nodes restart one at a time; wait for the roll to finish before assuming every node has the new password.

Scaling and Availability

  • Cluster size. replicas sets the number of OpenSearch nodes and must be odd. Three nodes is the smallest size that tolerates the loss of one node.
  • Per-node resources. resources.maxMemory is the first knob to raise as index volume grows.
  • Storage. Set volumeset.capacity for the data you expect, or enable volumeset.autoscaling so each node’s volume grows as it fills. Volumes cannot shrink.
  • Rolling restarts. The nodes restart one at a time, and reads and writes continue through a rolling restart of a three-node cluster.
  • Audit and finding indices have no retention policy. Add an Index State Management policy if volume is high.

Troubleshooting

Cause: A prerequisite secret is missing.Fix: Read the reason from the deployment status, create the secret it names, then wait for the rollout:
Cause: The API only speaks HTTPS.Fix: Use https:// with --cacert ca.crt and the admin credentials.
Cause: The client does not trust the cluster’s certificate authority.Fix: Pass the ca.crt from the prerequisite step with --cacert ca.crt, or add it to the client’s trust store.
Cause: The credentials secret is the source of truth for admin and kibanaserver and is re-applied at every node start.Fix: Change the password in the secret and redeploy, as in Rotating Passwords.
Cause: backup.enabled was turned on for a cluster that was already running. The repository plugin is installed by each node’s startup script, so the repository cannot be registered until every node has restarted with the plugin present. The setup job retries until that happens.Fix: Wait. The job converges on its own once all nodes carry the plugin. Check progress with:
Cause: The IAM policy grants object actions on arn:aws:s3:::YOUR_BUCKET_NAME/* only. s3:ListBucket and s3:GetBucketLocation authorize against the bucket ARN itself.Fix: Add arn:aws:s3:::YOUR_BUCKET_NAME to the policy’s Resource list, as shown in Backing Up.
Cause: The application is using the bare workload name. The short name is not reliably resolvable.Fix: Use the fully-qualified hostname RELEASE_NAME-opensearch.GVC_NAME.cpln.local:9200, and confirm the calling workload is admitted by internal_access.
Cause: demoLogs.enabled: true with dashboard.enabled: false. The demo setup job creates the demo-logs* index pattern in Dashboards and cannot complete without it.Fix: Set dashboard.enabled: true and upgrade the release, or disable the demo pipeline.
Cause: In OpenSearch 3.8.0 Dashboards the Create correlation rule form and Add threat intel source with a local file do nothing.Fix: Create them through the API. Correlation rules: POST _plugins/_security_analytics/correlation/rules. Threat intel sources: POST _plugins/_security_analytics/threat_intel/sources with "type": "IOC_UPLOAD" and "enabled": false (an uploaded list is not refreshed on a schedule). Both then appear in Dashboards. An uploaded list matches nothing until a threat intel monitor scans for it: POST _plugins/_security_analytics/threat_intel/monitors with per_ioc_type_scan_input_list (for example ioc_type: ipv4-addr and index_to_fields_map from your index to its IP field) and a trigger whose data_sources names the source. Matches appear under Findings > Threat intel.

Important Notes

  • Both prerequisite secrets must exist before install. A missing one leaves the nodes waiting with nothing in the logs; status.versions[].message names it.
  • Rotate passwords through the credentials secret, then run cpln workload force-redeployment on the workloads that use it. See Rotating Passwords. Use a strong, generated password.
  • Changing the CA restarts the whole cluster. Old and new certificates do not trust each other, so the cluster is unavailable until every node has restarted with the new CA.
  • replicas must be odd. An even count cannot form a quorum and is rejected when the chart renders.
  • Turn backups on at install time where you can. On a running cluster, every node has to restart before the repository can be registered.
  • Switching backup.provider on an existing release leaves the old cloud binding attached. Uninstall and reinstall if you need it gone; take a snapshot first.
  • Always leave .opendistro_security out of restores and never close _all.
  • Use the fully-qualified internal hostname RELEASE_NAME-opensearch.GVC_NAME.cpln.local:9200; the bare workload name is not reliably resolvable.
  • cpln helm uninstall deletes the volume sets. Data survives a cpln helm upgrade but not an uninstall; enable snapshots to a bucket if the data matters.

External References

OpenSearch Documentation

Official OpenSearch documentation

Security Plugin

Users, roles, tenants and TLS

Security Analytics

Detectors, Sigma rules, findings and alerts

Snapshot and Restore

Taking and restoring snapshots through the API

OpenSearch Template

View the source files, default values, and chart definition