Skip to main content
Version: 8.9 (unreleased)

Use external Elasticsearch with Helm

Configure Camunda 8 Self-Managed to connect to an external Elasticsearch instance as a secondary storage backend. Elasticsearch is used for indexing and querying operational data consumed by multiple Camunda components. For a canonical definition, see Elasticsearch/OpenSearch.

Starting with Camunda 8.9, the Helm chart no longer provisions Elasticsearch by default. To use Elasticsearch as secondary storage, you must explicitly configure it in your Helm values under the component-specific options (orchestration.data.secondaryStorage.elasticsearch and optimize.database.elasticsearch). You can either deploy Elasticsearch using the ECK operator (recommended) or connect Camunda to an existing external Elasticsearch instance, either running inside the same Kubernetes cluster or outside it.

note

The bundled Elasticsearch Bitnami subchart (elasticsearch.enabled: true) is deprecated and will be removed in a future release. For production deployments, use the ECK (Elastic Cloud on Kubernetes) operator or a managed Elasticsearch service instead. See deploy required dependencies with Kubernetes operators for details.

Prerequisites

Before configuring, collect the following information about your external Elasticsearch instance:

  • URL to access the cluster (protocol, host, and port)
  • Authentication requirements and credentials (if needed)
  • TLS requirements:
    • Whether the certificate is publicly trusted
    • Whether you need to provide a custom or self-signed certificate

Configuration

Parameters

Orchestration Cluster secondary storage

values.yaml optiontypedefaultdescription
orchestration.data.secondaryStorage.typestring""Type of secondary storage. Set to elasticsearch to use Elasticsearch.
orchestration.data.secondaryStorage.elasticsearch.urlstring""URL for the Elasticsearch cluster as scheme://host:port (for example, http://elasticsearch:9200).
orchestration.data.secondaryStorage.elasticsearch.auth.usernamestring""Username for Elasticsearch authentication.
orchestration.data.secondaryStorage.elasticsearch.auth.secret.inlineSecretstring""Elasticsearch password as a plain-text value (non-production only).
orchestration.data.secondaryStorage.elasticsearch.auth.secret.existingSecretstring""Reference to an existing Kubernetes Secret containing the password.
orchestration.data.secondaryStorage.elasticsearch.auth.secret.existingSecretKeystring""Key within the existing Kubernetes Secret containing the password.
orchestration.data.secondaryStorage.elasticsearch.tls.secret.existingSecretstring""Reference to an existing Kubernetes Secret containing the TLS trust store.
orchestration.data.secondaryStorage.elasticsearch.tls.secret.existingSecretKeystring""Key within the existing Kubernetes Secret for the TLS trust store.
orchestration.index.prefixstring""Index prefix in Elasticsearch for the new Camunda exporter and the Orchestration Cluster.

Optimize database

values.yaml optiontypedefaultdescription
optimize.database.elasticsearch.enabledbooleanfalseEnable Elasticsearch for Zeebe exporter and Optimize.
optimize.database.elasticsearch.externalbooleanfalseSet to true to connect to an external Elasticsearch instance.
optimize.database.elasticsearch.auth.usernamestring""Username for external Elasticsearch authentication.
optimize.database.elasticsearch.auth.secret.inlineSecretstring""Elasticsearch password as a plain-text value (non-production only).
optimize.database.elasticsearch.auth.secret.existingSecretstring""Reference to an existing Kubernetes Secret containing the password.
optimize.database.elasticsearch.auth.secret.existingSecretKeystring""Key within the existing Kubernetes Secret containing the password.
optimize.database.elasticsearch.prefixstringzeebe-recordIndex prefix for zeebe-record indices. See Configure Elasticsearch and OpenSearch index prefixes.
optimize.database.elasticsearch.tls.enabledbooleanfalseEnable TLS when connecting to Elasticsearch.
optimize.database.elasticsearch.tls.secret.existingSecretstring""Name of the Kubernetes Secret containing a TLS certificate.
optimize.database.elasticsearch.tls.secret.existingSecretKeystringexternaldb.jksKey within the secret containing the TLS certificate.
optimize.database.elasticsearch.url.protocolstring""Protocol to use when connecting to Elasticsearch. Possible values are http and https.
optimize.database.elasticsearch.url.hoststring""Hostname or IP address of the Elasticsearch instance.
optimize.database.elasticsearch.url.portinteger0Port number of the Elasticsearch instance.

Bundled Elasticsearch subchart (deprecated)

values.yaml optiontypedefaultdescription
elasticsearch.enabledbooleanfalseEnables or disables the bundled Elasticsearch subchart.

Example usage

Connect to external Elasticsearch without a certificate

Configure the Camunda 8 Self-Managed Helm chart as follows:

orchestration:
data:
secondaryStorage:
type: elasticsearch
elasticsearch:
url: http://elastic.example.com:443
auth:
username: elastic
secret:
inlineSecret: pass

optimize:
database:
elasticsearch:
enabled: true
external: true
auth:
username: elastic
secret:
inlineSecret: pass
url:
protocol: http
host: elastic.example.com
port: 443

elasticsearch:
enabled: false

Connect to external Elasticsearch with a self-signed certificate

If the Elasticsearch cluster accepts only https requests with a self-signed certificate:

  1. Create an externaldb.jks file from the Elasticsearch certificate file. For example, using the keytool CLI:

    keytool -import -alias elasticsearch -keystore externaldb.jks -storetype jks -file elastic.crt -storepass changeit -noprompt
  2. Create a Kubernetes secret from the externaldb.jks file before installing Camunda:

    kubectl  create secret -n camunda generic elastic-jks --from-file=externaldb.jks
  3. Configure the Camunda 8 Self-Managed Helm chart:

    orchestration:
    data:
    secondaryStorage:
    type: elasticsearch
    elasticsearch:
    url: https://elastic.example.com:443
    auth:
    username: elastic
    secret:
    inlineSecret: pass
    tls:
    secret:
    existingSecret: elastic-jks
    existingSecretKey: externaldb.jks

    optimize:
    database:
    elasticsearch:
    enabled: true
    external: true
    tls:
    enabled: true
    secret:
    existingSecret: elastic-jks
    auth:
    username: elastic
    secret:
    inlineSecret: pass
    url:
    protocol: https
    host: elastic.example.com
    port: 443

    elasticsearch:
    enabled: false

Connect to external Elasticsearch with a publicly trusted certificate

This configuration works with managed Elasticsearch services. It has been tested with Elastic Cloud on Google Cloud.

orchestration:
data:
secondaryStorage:
type: elasticsearch
elasticsearch:
url: https://elastic.example.com:443
auth:
username: elastic
secret:
inlineSecret: pass

optimize:
database:
elasticsearch:
enabled: true
external: true
auth:
username: elastic
secret:
inlineSecret: pass
url:
protocol: https
host: elastic.example.com
port: 443

elasticsearch:
enabled: false

Connect to external Elasticsearch with custom index prefixes

When running multiple Camunda instances on a shared Elasticsearch cluster, use custom index prefixes to isolate data:

orchestration:
data:
secondaryStorage:
type: elasticsearch
elasticsearch:
url: https://elastic.example.com:443
auth:
username: elastic
secret:
inlineSecret: pass
index:
prefix: my-env-camunda # Prefix for Orchestration Cluster indices

optimize:
database:
elasticsearch:
enabled: true
external: true
prefix: my-env-zeebe # Prefix for zeebe-record indices
auth:
username: elastic
secret:
inlineSecret: pass
url:
protocol: https
host: elastic.example.com
port: 443

elasticsearch:
enabled: false

For more details on index prefix configuration, including Optimize-specific settings, see Prefix Elasticsearch/OpenSearch indices.

Troubleshooting

If Zeebe pods fail, check for the following error:

  • The host is unreachable or DNS is not properly resolving to an IP address listening on the specified port.

    Caused by: java.net.UnknownHostException: elastic.example.com

References

Next steps

Use the custom values file to deploy Camunda 8:

helm install camunda camunda/camunda-platform --version $HELM_CHART_VERSION -f existing-elasticsearch-values.yaml