Blog Post

Apps on Azure Blog
12 MIN READ

Getting Started with OpenSearch on AKS with AKS AVM and Helm

prafullawani's avatar
prafullawani
Icon for Microsoft rankMicrosoft
May 18, 2026

Co-authored by Chetan Vaja (Senior Cloud Solution Architect @ Microsoft), Ninad Kapse (Senior Cloud Solution Architect @ Microsoft), Vikas Gautam (Senior Cloud Solution Architect @ Microsoft), and Prafulla Wani (Principal Cloud Solution Architect @ Microsoft).

Summary

OpenSearch is a community-driven, open-source search and analytics suite used by developers to ingest, search, visualize, and analyze data. OpenSearch consists of a data store and search engine (OpenSearch), a visualization and user interface (OpenSearch Dashboards), and a server-side data collector (Data Prepper). This post walks through a starter blueprint for running OpenSearch on Azure Kubernetes Service (AKS) using an AKS Azure Verified Modules (AVM) baseline, separate Helm releases for manager and data tiers, and an internal-only access pattern for Dashboards and the OpenSearch API. The goal is a clean, repeatable foundation that platform teams can evolve toward production without restarting from a throwaway lab.

OpenSearch is a strong fit for teams that want a Kubernetes-native search and analytics platform while keeping Azure-native control over cluster creation, managed identity, networking, storage, observability, and access boundaries. Because OpenSearch carries persistent shard storage, JVM heap requirements, disk-pressure behavior, cluster elections, recovery flows, and snapshot expectations, a reusable AKS pattern needs to address more than helm install.

How is this different from a stateless AKS microservice deployment?

A typical AKS microservice runs as a Deployment with stateless replicas that can restart almost anywhere, holding durable state in an external service. OpenSearch behaves differently:

  • Manager and data tiers run as StatefulSets.
  • Each manager pod needs its own disk for cluster metadata durability.
  • Each data pod needs its own disk for shard storage, relocation, and recovery.
  • A missing or unbound PersistentVolumeClaim (PVC) blocks pod startup.

 

OpenSearch architecture

The two diagrams below are useful for grounding the AKS mapping in OpenSearch's own model before introducing Azure-specific choices.

Source: OpenSearch documentation, cluster architecture diagram. OpenSearch Contributors, Apache License 2.0.

 

Source: OpenSearch documentation, shard and replica diagram. OpenSearch Contributors, Apache License 2.0.

What this post covers

The blueprint is intentionally split into a small number of building blocks so AKS platform concerns stay reusable and the OpenSearch workload carries its own installation and operational guidance:

  • A shared AKS baseline (AVM-based).
  • Terraform and Bicep wrappers for the OpenSearch workload.
  • Deployment guidance for both portal-first and CLI-first operators.
  • Helm values and Kubernetes manifests for the manager, data, and Dashboards releases.
  • Snapshot storage with workload identity instead of shared keys.

Reference implementation assets that match this walkthrough are available in the companion repo: github.com/prwani/oss-data-on-aks.

Version contract

The versions below are the ones this walkthrough is validated against. Inherit chart defaults for runtime images and revalidate the chart versions before publication.

ComponentVersion
Manager and data chartsopensearch/opensearch 3.6.0
Dashboards chartopensearch/opensearch-dashboards 3.2.0

Versions verified against the upstream charts as of May 2026. Revalidate before re-publishing or before pinning these versions in your own environment.

Target architecture

The blueprint combines OpenSearch cluster roles, shard and replica behavior, dedicated AKS node pools, StatefulSets, and per-pod PVC-backed Azure Disks.

Custom AKS mapping combining OpenSearch logical architecture with this blueprint's AKS deployment pattern. Diagram generated with AI assistance and reviewed by the author.

Architecture decisions at a glance

LayerRecommendationRationale
AKS baselineShared AVM wrapperConsistent cluster creation across workloads
Manager tierDedicated Helm releaseProtects elections and cluster metadata
Data tierDedicated Helm releaseIsolates shard-heavy indexing and storage I/O
OpenSearch APIClusterIP onlyReduces exposure of the core service
DashboardsInternal Azure Load BalancerOperator access without a public API
Persistent storageAzure Disk CSI, Premium SSDSensible default for durable stateful workloads
SnapshotsAzure Blob StorageExternal recovery target

The Helm release names used throughout this blueprint are opensearch-manager, opensearch-data, and opensearch-dashboards. The Helm values and service-discovery examples assume those names.

Design rationale

  • Cluster creation is anchored to a shared AVM baseline rather than ad hoc az aks create calls.
  • Manager and data responsibilities are separated from day one, so node-pool sizing, JVM tuning, and disk class can evolve independently.
  • Storage and access choices are expressed in source control instead of cluster state.
  • Both portal-first and CLI-first operators are first-class consumers of the same blueprint.
  • Documentation and infrastructure assets sit alongside each other so they can evolve together rather than drifting apart.

Deployment

While this blog provides a focused, scenario-specific deployment approach for OpenSearch on Azure Kubernetes Service (AKS), it intentionally limits scope to keep implementation simple and practical. Readers are strongly encouraged to review the official Azure Architecture Center guidance on AKS deployments for a more comprehensive understanding of production-grade considerations. The referenced documentation outlines critical best practices across areas such as security hardening, network topology, identity and access management, governance, scalability, and operational excellence. It also covers multiple deployment scenarios and design patterns that go beyond the scope of this blog, helping ensure that your AKS environment aligns with enterprise standards, compliance requirements, and resilient architecture principles.

See: Azure Architecture Center — AKS deployment guidance.

Prerequisites

  • An Azure subscription with AKS and managed-disk quota.
  • Azure CLI installed and signed in.
  • kubectl installed.
  • git installed
  • Helm 3.x installed.
  • Terraform 1.11+ if you take the Terraform path.
  • A globally unique storage account name for snapshot storage.

Pick a deployment path

A portal template is available for the Azure baseline. The Kubernetes and Helm steps follow as a CLI walkthrough.

Click the button to deploy the Azure baseline — AKS cluster, dedicated node pools (systempool, osmgr, osdata), the snapshot storage account, and the managed identity with federated credentials. Then pick up at Step 2 below to install OpenSearch.

Deploy baseline to Azure

After the baseline deployment completes, open the deployment Outputs tab and copy the generated values, especially deployedClusterName, deployedSnapshotStorageAccount, andsnapshotManagedIdentityClientId.  We will use these outputs in the Kubernetes and Helm steps that follow.

Get the repo locally

All CLI steps below reference files from the companion repo — manifests, Helm values, Bicep, Terraform, and the helper script. Clone it once and run every command from the repo root.

git clone https://github.com/prwani/oss-data-on-aks.git
cd oss-data-on-aks

 

The sections below walk through the full CLI flow. If you used the portal button, skip Step 1 and start at Step 2.

Step 1: Deploy the AKS baseline (skip Step 1 if you used the "Deploy to Azure" button)

If you already deployed the baseline through the portal button above, skip ahead to Step 2 — this step is the CLI equivalent of that button.

Both IaC paths are kept in the repo because teams standardize differently.

Bicep

export LOCATION=swedencentral
export RESOURCE_GROUP=rg-opensearch-aks-dev
export CLUSTER_NAME=aks-opensearch-dev
export SNAPSHOT_STORAGE_ACCOUNT="opssnapdev$(openssl rand -hex 3)"

az group create \
  --name "$RESOURCE_GROUP" \
  --location "$LOCATION"

az deployment group create \
  --resource-group "$RESOURCE_GROUP" \
  --template-file workloads/search-analytics/opensearch/infra/bicep/main.bicep \
  --parameters \
    clusterName="$CLUSTER_NAME" \
    location="$LOCATION" \
    snapshotStorageAccountName="$SNAPSHOT_STORAGE_ACCOUNT"

Terraform

cd workloads/search-analytics/opensearch/infra/terraform
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars for your resource group, region, cluster name,
# and globally unique snapshot storage account name.

terraform init
terraform plan
terraform apply

The wrappers focus on the AKS baseline plus a starter snapshot storage account — not every day-2 detail. When snapshot storage is enabled, they also enable the AKS OIDC issuer and workload identity, create a user-assigned managed identity with federated credentials for the OpenSearch snapshot service accounts, and disable shared-key access on the starter storage account. The node pools provisioned are systempool, osmgr, and osdata; osmgr and osdata start with three nodes each so the default manager and data replica counts can satisfy hard anti-affinity rules.

To get the output value(s) required in subsequent steps, execute below commands -

DEPLOYMENT_NAME="$(az deployment group list \
   --resource-group "$RESOURCE_GROUP" \
   --query "sort_by([].{name:name,timestamp:properties.timestamp}, &timestamp)[-1].name" \
   -o tsv)"

az deployment group show \
   --resource-group "$RESOURCE_GROUP" \
   --name "$DEPLOYMENT_NAME" \
   --query "{clientId: properties.outputs.snapshotManagedIdentityClientId.value, container: properties.outputs.deployedSnapshotContainer.value}" \
   -o tsv

 

Step 2: Connect to AKS and create the namespace

This is where the workflow continues for operators who used the portal button. Steps 2–7 install OpenSearch onto the baseline cluster and apply to every path.

az aks get-credentials \
  --resource-group "$RESOURCE_GROUP" \
  --name "$CLUSTER_NAME"

kubectl apply -f workloads/search-analytics/opensearch/kubernetes/manifests/managed-csi-premium-storageclass.yaml
kubectl apply -f workloads/search-analytics/opensearch/kubernetes/manifests/namespace.yaml

If snapshot storage is enabled, capture the snapshot managed-identity client ID from the deployment outputs — the Helm install uses it to annotate the workload-identity service accounts.

Step 3: Create the bootstrap secrets

The blueprint ships example secret manifests for the admin password, Dashboards credentials and cookie secret, and the snapshot storage account name that the Azure repository plugin loads into the OpenSearch keystore. Treat the example YAML as templates — create real secrets rather than applying them unchanged:


read -r -s -p "Enter admin password: " strong_admin_password
echo

kubectl create secret generic opensearch-admin-credentials \
  --namespace opensearch \
  --from-literal=password="$strong_admin_password" \
  --dry-run=client -o yaml | kubectl apply -f -

export DASHBOARDS_COOKIE_SECRET="$(openssl rand -hex 16)"

kubectl create secret generic opensearch-dashboards-auth \
  --namespace opensearch \
  --from-literal=username='admin' \
  --from-literal=password="$strong_admin_password" \
  --from-literal=cookie="$DASHBOARDS_COOKIE_SECRET" \
  --dry-run=client -o yaml | kubectl apply -f -

kubectl create secret generic opensearch-snapshot-settings \
  --namespace opensearch \
  --from-literal=azure.client.default.account="$SNAPSHOT_STORAGE_ACCOUNT" \
  --dry-run=client -o yaml | kubectl apply -f -

Step 4: Install the manager tier

The blueprint uses a dedicated release for manager nodes. The surrounding documentation uses cluster-manager language, but the current Helm chart still references masterService and the master role in its values.

export OPENSEARCH_HELM_VERSION=3.6.0
export OPENSEARCH_DASHBOARDS_HELM_VERSION=3.2.0
export SNAPSHOT_IDENTITY_CLIENT_ID="<snapshot-managed-identity-client-id>"

helm repo add opensearch https://opensearch-project.github.io/helm-charts/
helm repo update

helm upgrade --install opensearch-manager opensearch/opensearch \
  --version "$OPENSEARCH_HELM_VERSION" \
  --namespace opensearch \
  --set-string "rbac.serviceAccountAnnotations.azure\\.workload\\.identity/client-id=$SNAPSHOT_IDENTITY_CLIENT_ID" \
  --values workloads/search-analytics/opensearch/kubernetes/helm/manager-values.yaml

The manager values configure three manager replicas, Premium SSD-backed PVCs, hard anti-affinity, optional node-pool targeting for an osmgr AKS pool, and the repository-azure plugin with azure.client.default.token_credential_type: managed_identity for the keyless snapshot path.

Step 5: Install the data tier

The data release joins the same cluster and points back to the manager service for discovery:

helm upgrade --install opensearch-data opensearch/opensearch \
  --version "$OPENSEARCH_HELM_VERSION" \
  --namespace opensearch \
  --set-string "rbac.serviceAccountAnnotations.azure\\.workload\\.identity/client-id=$SNAPSHOT_IDENTITY_CLIENT_ID" \
  --values workloads/search-analytics/opensearch/kubernetes/helm/data-values.yaml

The data values raise storage and JVM sizing relative to the manager tier and target a dedicated osdata node pool.

Step 6: Install Dashboards with internal-only exposure

helm upgrade --install opensearch-dashboards opensearch/opensearch-dashboards \
  --version "$OPENSEARCH_DASHBOARDS_HELM_VERSION" \
  --namespace opensearch \
  --values workloads/search-analytics/opensearch/kubernetes/helm/dashboards-values.yaml

The Dashboards values point Dashboards at the internal OpenSearch service and expose the Dashboards service through an internal Azure Load Balancer — a safer default than publishing the OpenSearch API.

To find the internal Dashboards URL once Azure has assigned the private load-balancer IP:

kubectl get svc opensearch-dashboards -n opensearch

Use the address shown under EXTERNAL-IP (the private LB IP), not CLUSTER-IP — the cluster IP is only reachable from inside Kubernetes. From a network path that can reach the AKS VNet, open http://:5601. If your workstation has no direct path to the internal IP, use port-forward instead:

kubectl port-forward svc/opensearch-dashboards 5601:5601 -n opensearch

Note: Run kubectl port-forward from a local terminal (Windows with WSL, Linux, or macOS) — not from Azure Cloud Shell. Cloud Shell forwards the port to its own container, which your browser cannot reach, so http://127.0.0.1:5601 will not open.

Then open http://127.0.0.1:5601. The default username is admin and the password is the value used for when creating opensearch-admin-credentials and opensearch-dashboards-auth in Step 3.

 

Step 7: Validate the deployment

At a minimum, validate the pod set, PVC bindings, and service shape:

kubectl get pods -n opensearch
kubectl get pvc -n opensearch
kubectl get svc -n opensearch
kubectl describe svc opensearch-dashboards -n opensearch

The output may look like following -

The PVC check is not optional for this workload: manager and data pods each depend on their own Azure Disk-backed PVC, so every claim must show Bound before the rollout is trustworthy.

For API validation without public exposure, use port-forward:

kubectl port-forward svc/opensearch-manager 9200:9200 -n opensearch

If the starter snapshot storage path is deployed, register and verify the Azure Blob repository once the cluster is healthy:

#update the value of "SNAPSHOT_CONTAINER" from the output of last command in step-1. You can always rerun that command.
SNAPSHOT_CONTAINER="opensearch-snapshots"

# Register the Azure managed identity snapshot repository.
curl -k \
   --user "admin:$strong_admin_password" \
   -X PUT "https://127.0.0.1:9200/_snapshot/azure-managed-identity" \
   -H "Content-Type: application/json" \
   -d "{\"type\":\"azure\",\"settings\":{\"client\":\"default\",\"container\":\"$SNAPSHOT_CONTAINER\"}}"

# Verify OpenSearch can access the snapshot repository.
curl -k \
   --user "admin:$strong_admin_password" \
   -X POST "https://127.0.0.1:9200/_snapshot/azure-managed-identity/_verify?pretty"

Exercise the OpenSearch API

Once the cluster is healthy, the standard OpenSearch Search data walkthrough — query string queries and Query DSL — runs unchanged against this deployment through the port-forwarded manager service.

Load a small sample data set:

export OPENSEARCH_URL=https://127.0.0.1:9200

# Delete the existing students index, if it exists
curl -k --user "admin:$strong_admin_password" \
   -X DELETE "${OPENSEARCH_URL}/students"

# Bulk load sample student documents into the students index and refresh it.
printf '%s\n' \
 '{ "create": { "_index": "students", "_id": "1" } }' \
 '{ "name": "John Doe", "gpa": 3.89, "grad_year": 2022 }' \
 '{ "create": { "_index": "students", "_id": "2" } }' \
 '{ "name": "Jonathan Powers", "gpa": 3.85, "grad_year": 2025 }' \
 '{ "create": { "_index": "students", "_id": "3" } }' \
 '{ "name": "Jane Doe", "gpa": 3.52, "grad_year": 2024 }' \
 | curl -k --user "admin:$strong_admin_password" \
   -X POST "${OPENSEARCH_URL}/_bulk?refresh=true" \
   -H "Content-Type: application/x-ndjson" \
   --data-binary @-

Then try a few searches:

# Retrieve all documents.
curl -k --user "admin:$strong_admin_password" \
   "${OPENSEARCH_URL}/students/_search?pretty"

# Query string query.
curl -k --user "admin:$strong_admin_password" \
   "${OPENSEARCH_URL}/students/_search?q=name:john&pretty"

# Query DSL full-text search.
curl -k --user "admin:$strong_admin_password" \
   -X GET "${OPENSEARCH_URL}/students/_search?pretty" \
   -H "Content-Type: application/json" \
   -d '{"query":{"match":{"name":"doe john"}}}'

# Exact-value and range filters.
curl -k --user "admin:$strong_admin_password" \
   -X GET "${OPENSEARCH_URL}/students/_search?pretty" \
   -H "Content-Type: application/json" \
   -d '{"query":{"bool":{"must":[{"match":{"name":"doe"}},{"range":{"gpa":{"gte":3.6,"lte":3.9}}},{"term":{"grad_year":2022}}]}}}'

These calls prove that indexing, full-text analysis, exact filters, and range filters are all working. 

Once data is in the cluster, the OpenSearch Dashboards quickstart is the natural next step for exploring it visually.

What comes next

This first post is about getting OpenSearch running on AKS with a cleaner Azure-first blueprint. The next question is what changes when the workload needs to behave like a durable platform rather than a demo: dedicated node-pool sizing, disk headroom, private-only access, zone-resiliency, performance benchmarking, snapshots and restore drills, observability, and day-2 operations. Those are the focus of Part 2.

Try, learn, follow

Join the conversation

What sizing or day-2 capability would you want covered first in Part 2 — snapshot and restore drills, observability with Azure Monitor and Container Insights, or multi-zone failover testing? Drop a comment below, and if you have already run OpenSearch on AKS in your own environment, share what tripped you up first.


Trademarks: OpenSearch is a registered trademark of the OpenSearch Software Foundation. Apache® and Apache License 2.0 are trademarks of the Apache Software Foundation. Kubernetes® is a registered trademark of The Linux Foundation. Terraform® is a registered trademark of HashiCorp, Inc. Other names mentioned may be trademarks of their respective owners.

Updated May 18, 2026
Version 2.0

3 Comments

  • r3verse's avatar
    r3verse
    Tin Contributor

    Looks good, what about implementing the OpenSearch Kubernetes Operator? Wouldn't that be a better approach in OpenSearch infra management? 

    • prafullawani's avatar
      prafullawani
      Icon for Microsoft rankMicrosoft

      Thanks for bringing it up. We will cover "OpenSearch Operator" in blog-2, which is targeted towards "day-2 operations".

      • r3verse's avatar
        r3verse
        Tin Contributor

        Already looking forward to it, thanks for the reply!