Create OpenSearch with GitHub Actions ΒΆ

OpenSearch is only available in GCP

OpenSearch is only available in GCP clusters, and will not work in on-prem clusters.

Prerequisites ΒΆ

Create the manifest ΒΆ

Create .nais/opensearch.yaml:

.nais/opensearch.yaml

Change the name and configuration for your needs. See the complete generated example and OpenSearch manifest reference.

Set spec.version to a supported version listed in the manifest reference. To upgrade, check the OpenSearch breaking changes, update spec.version, and apply the manifest again. Downgrades are not supported.

Create the workflow ΒΆ

Create .github/workflows/deploy-opensearch.yaml:

.github/workflows/deploy-opensearch.yaml

Replace <MY-TEAM> with your Nais team and <MY-ENV> with a GCP environment available to your tenant, such as dev-gcp or prod-gcp for NAV.

The example uses major action tags for readability. Pin actions to full commit SHAs in production, and use Dependabot to keep them updated. See GitHub's secure use reference .

Commit and push both files to main. The push trigger runs when the manifest changes. If you only change the workflow, run it manually from the Actions tab in GitHub.

A manual run applies the manifest from the selected Git ref, regardless of the paths filter.

Next steps ΒΆ

🎯 Use OpenSearch in your workload