Skip to main content
Version: 8.8 (unreleased)

Use external Elasticsearch with Helm

This guide explains how to connect Camunda 8 to an external Elasticsearch instance.

By default, the Helm chart deployment creates a new Elasticsearch instance. You can also connect to an external Elasticsearch instance, either in the same Kubernetes cluster or outside it.

For production deployments, Camunda recommends managing Elasticsearch installations externally (without enabling the Elasticsearch subchart). This gives more flexibility for scaling, backups, and upgrades without affecting the rest of the Camunda installation.

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 configuration: Is it publicly trusted, or do you need to provide a certificate?

Configuration

Parameters

values.yaml optiontypedefaultdescription
global.elasticsearch.enabledbooleantrueEnable or disable all components connecting to Elasticsearch.
global.elasticsearch.external.truebooleanfalseSet to true to connect to an external Elasticsearch instance.
global.elasticsearch.auth.usernamestring""HTTP Basic username for Elasticsearch authentication.
global.elasticsearch.auth.passwordstring""HTTP Basic password for Elasticsearch authentication.
global.elasticsearch.tls.enabledbooleanfalseWhether Elasticsearch listens on TLS.
global.elasticsearch.tls.secret.inlineSecretstring""TLS certificate specified directly in values.yaml.
global.elasticsearch.tls.secret.existingSecretstring""Kubernetes Secret name containing a TLS certificate.
global.elasticsearch.tls.secret.existingSecretKeystring""Kubernetes Secret key with the TLS certificate.
global.elasticsearch.url.protocolstringhttpProtocol to use when connecting to Elasticsearch. Possible values are http and https.
global.elasticsearch.url.hoststring{{ .Release.Name }}-elasticsearchHostname or IP address of the Elasticsearch instance.
global.elasticsearch.url.portinteger9200Port number of the Elasticsearch instance.
elasticsearch.enabledbooleantrueEnable or disable the Elasticsearch subchart

Example usage

Connect to external Elasticsearch without a certificate

By default, global.elasticsearch.url.protocol is set to http. This makes it possible to connect to Elasticsearch without TLS.

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

global:
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:

    global:
    elasticsearch:
    enabled: true
    external: true
    tls:
    enabled: true
    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.

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

elasticsearch:
enabled: false

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