logSearch.* values.
Quick start
For a private cloud or on-prem quick start, enable the bundled OpenSearch subchart and log search in the same Helm upgrade. This is the shortest path because the chart can create the OpenSearch resources, Fluent Bit config, and index setup job for you. LeavelogSearch.opensearch.host empty; the chart
derives the in-cluster OpenSearch service name.
Requirements
- A Mage deployment managed by the Mage Helm chart.
- A Kubernetes Secret with a strong
OPENSEARCH_INITIAL_ADMIN_PASSWORDvalue for bundled OpenSearch. - A
ReadWriteOncestorage class for the bundled OpenSearch data volume when your cluster does not have a suitable default StorageClass. For example, an EKS cluster that uses EFS for shared Mage project files may still need an EBS-backed class such asgp2orgp3for OpenSearch. - A Kubernetes PVC that contains the Mage project files and log files. The
quick start reuses this PVC through
logSearch.persistence.existingClaim.
Minimum values
Create a Secret for the bundled OpenSearch admin bootstrap password.logSearch.opensearch.host, logSearch.opensearch.port, and
logSearch.opensearch.index can be omitted in bundled mode. The chart derives
the bundled OpenSearch host and defaults to port 9200 and index mage_logs.
Add logSearch.persistence.subPath only when your project/log PVC requires it.
logSearch.setupJob.enabled defaults to false, so keep it set to true when
you want Helm to create the mage_logs index during the upgrade.
Do not commit the real OPENSEARCH_INITIAL_ADMIN_PASSWORD value into
values.yaml.
If your cluster does not have a suitable default StorageClass for OpenSearch,
add one explicitly:
Render and upgrade
Render the exact chart source and values you plan to deploy.USE_OPENSEARCH_FOR_LOGS=true, the Fluent Bit sidecar, the chart-rendered
Fluent Bit ConfigMap, and the chart-rendered index setup Job. Then upgrade the
release.
logSearch.setupJob.enabled=false in later upgrades if you do not want Helm
to run it again.
Customize the quick start
Use the quick start as the base, then customize only the pieces your deployment needs.External OpenSearch
To use an external or managed OpenSearch cluster, leaveopensearch.enabled
unset or false, and set logSearch.opensearch.host.
opensearch.enabled=false, logSearch.opensearch.host is required. The
chart fails rendering if log search is enabled for an external OpenSearch
cluster without a host.
Auth and TLS
For OpenSearch auth, create a Secret withOPENSEARCH_USERNAME and
OPENSEARCH_PASSWORD, then reference it from logSearch.opensearch.auth.
ca.crt, then reference it from
logSearch.opensearch.tls.
OPENSEARCH_HTTP_SCHEME=https for Mage,
uses HTTPS in the index setup hook Job, and mounts the CA certificate at
/etc/ssl/opensearch/ca.crt. Fluent Bit receives OPENSEARCH_TLS=On.
Securing a bundled OpenSearch cluster also requires OpenSearch security
configuration, not only Mage-side auth variables. Make sure OpenSearch has valid
node/admin certificates, internal_users.yml, and role mappings, then run the
OpenSearch security bootstrap for the cluster if your OpenSearch distribution
requires it. Avoid mounting a custom roles.yml unless you intentionally need
to replace roles; overriding built-in static roles can prevent security
initialization. If Helm keeps reusing an earlier failed nested security value,
rerender with your intended values and consider an upgrade with --reset-values
using a complete values file.
Project mounts and generated PVCs
If an existing Mage release already has importantextraVolumes or
extraVolumeMounts, check the rendered Deployment carefully. The chart
preserves existing mounts and avoids injecting a duplicate /home/src project
mount when extraVolumeMounts already contains the log-search mount path. If
your release already mounts the project path, set
logSearch.persistence.mountInMageContainer=false and let Fluent Bit reuse that
mount read-only.
For generated log-search PVCs, use logSearch.persistence.accessModes and
storageClassName that match your topology. When standaloneScheduler=true or
replicaCount > 1, generated log-search PVCs must include ReadWriteMany; use
an existing RWX claim or set logSearch.persistence.accessModes accordingly.
Custom Fluent Bit config
The default path uses a chart-rendered Fluent Bit ConfigMap. UselogSearch.fluentBit.existingConfigMap or
logSearch.fluentBit.existingParsersConfigMap only when you need to provide
custom Fluent Bit ConfigMaps yourself.
If you override logSearch.fluentBit.config, keep the OpenSearch output
environment variables wired to the chart values:
Verify the deployment
Check that the Mage pod has both the Mage container and the Fluent Bit sidecar.curl flags for your
cluster, for example -u '<username>:<password>', https://localhost:9200, and
-k or --cacert.
Finally, open a pipeline’s Logs page in Mage and search for text that appears
in a recent pipeline or block run.
Troubleshooting
If searches return no results, check these items first:USE_OPENSEARCH_FOR_LOGSis set totruein the Mage web and scheduler pods.OPENSEARCH_HOST,OPENSEARCH_PORT, andOPENSEARCH_LOG_INDEXmatch the OpenSearch service and index.- The setup job completed, or the
mage_logsindex already exists. - The Fluent Bit sidecar can read the mounted project/log path.
- The Fluent Bit sidecar logs show successful flushes instead of connection, parser, or path errors.
- Auth and TLS settings are consistent across Mage, Fluent Bit, the setup job, and the OpenSearch cluster.
- The
logSearch.persistence.existingClaimandsubPathpoint at the same project files that Mage writes logs into. - If
opensearch.enabled=false,logSearch.opensearch.hostis set. The chart fails rendering when log search is enabled for an external OpenSearch cluster without a host.
examples/aws-eks/values-log-search.yaml and
examples/aws-eks/log-search-deployment.md.
Reference
What the chart creates
The Helm chart owns the non-secret log-search resources. In the default path, you do not need to create Fluent Bit ConfigMaps or anopensearch_setup.py
ConfigMap before running helm upgrade.
When logSearch.enabled=true, the chart can:
- set
USE_OPENSEARCH_FOR_LOGS=truein the Mage web and scheduler containers; - set
OPENSEARCH_HOST,OPENSEARCH_PORT, andOPENSEARCH_LOG_INDEX; - optionally set OpenSearch auth and TLS environment variables from Kubernetes Secrets;
- mount the project/log PVC into the Mage container and the Fluent Bit sidecar;
- render the
mageai-fluent-bitConfigMap fromlogSearch.fluentBit.configandlogSearch.fluentBit.parsers, unless you provide existing ConfigMaps; - run Fluent Bit to tail Mage log files and ship them to OpenSearch;
- render the
mageai-log-search-indexConfigMap fromlogSearch.setupJob.mapping; - create a log-search PVC when
logSearch.persistence.enabled=trueand noexistingClaimis set; - create a Helm hook Job that applies
logSearch.setupJob.mappingto create the OpenSearch log index.
mage_logs.
If you use a packaged chart from a Helm repository, render that packaged chart
too. If the rendered manifest does not include the logSearch environment
variables, OpenSearch subchart resources, Fluent Bit sidecar, chart-rendered
Fluent Bit ConfigMap, and chart-rendered index setup Job, use a newer chart
package or deploy from a checked-out chart source that includes the logSearch
templates.