graylog

by Graylog, Inc.

Helm chartv2.1.1App 7.1.8Verified publisher

Official Graylog Helm chart for Kubernetes

About this chart

Graylog Helm

Official Helm chart for Graylog.

Table of Contents

  • Requirements
    • External Dependencies
  • Installation
    • Installing on Kubernetes
    • Installing on AWS EKS
  • Post-installation
    • Set root Graylog password
    • Reset a lost root password
    • Set external access
  • Usage
    • Scale Graylog
    • Message Journal Lifecycle
    • Scale DataNode
    • Data Node Replicas and Data Redundancy
    • High Availability Defaults
    • Prometheus Metrics
    • Health Probes
    • Scale MongoDB
    • MongoDB Topology
    • Modify Graylog server.conf parameters
    • Customize deployed Kubernetes resources
    • Add inputs
    • Enable TLS
    • Delegate Data Node Roles
  • Using External Resources
    • Managing Secrets Externally
    • Bring Your Own MongoDB
    • Bring Your Own OpenSearch
  • Hardened Environments
  • Maintenance
    • Back Up and Restore MongoDB
  • Uninstall
    • Removing everything
  • Debugging
  • Logging
  • Graylog Helm Chart Values Reference

Requirements

  • Kubernetes v1.32+
  • Helm v3.0+
  • MongoDB Controllers for Kubernetes Operator v1.6.1 (required unless a user-provided MongoDB is supplied)

Prerequisites

Data Node

Kernel Parameter: vm.max_map_count

The Data Node component embeds OpenSearch, which requires the kernel parameter vm.max_map_count to be set to at least 262144. Most cloud-managed Kubernetes clusters (EKS, GKE, AKS) default to 65530, which will cause the Data Node to fail at startup.

Check the current value on your cluster nodes:

sysctl vm.max_map_count

If the value is less than 262144, you have two options:

Option 1: Manual cluster-wide fix (recommended for existing clusters)

# Run on each node (or via a DaemonSet)
sudo sysctl -w vm.max_map_count=262144

# Make it permanent
echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Option 2: Automatic fix via Helm (opt-in) Enable the sysctlInit container when installing. This runs a privileged init container once during pod startup to set the kernel parameter.

Values file approach (recommended):

# values.yaml
datanode:
  sysctlInit:
    enabled: true
    vmMaxMapCount: 262144  # optional, defaults to 262144

Then install: helm install graylog graylog/graylog -n graylog --create-namespace -f values.yaml

This runs a one-time privileged init container on each Data Node pod to adjust the kernel parameter. The container runs only during startup and does not affect the main application container.

The default value is 262144 (the minimum required by OpenSearch). The value must be at least 262144.

[!NOTE] This does not retroactively fix nodes that already exist in your cluster; existing nodes must be updated manually.

External Dependencies

This Helm chart is designed as a turnkey solution for quick demos and proofs of concept, as well as streamlined production-grade setups through external dependencies. These dependencies are not bundled with the chart and must be installed separately.

[!WARNING] We do not provide support for any of these optional dependencies. Please refer to their respective documentation for installation, usage, and troubleshooting.

MongoDB Operator

The official MongoDB Controllers for Kubernetes (MCK) Operator is the recommended method for provisioning the MongoDB replica sets required for running Graylog in production. This decoupled approach provides greater flexibility, improved lifecycle management, operational consistency, and overall production readiness.

You may also choose to bring your own MongoDB, but for ease of deployment as well as improved reliability the MCK Operator remains the preferred way to deploy MongoDB and is therefore enabled by default.

OpenSearch

The chart deploys the Graylog Data Node by default, which manages its own embedded OpenSearch, so no external search backend is required. If you would rather run OpenSearch yourself — for example with the OpenSearch Kubernetes Operator — you can bring your own OpenSearch instead. The cluster must run a Graylog-supported OpenSearch version (2.x, up to 2.19.x for Graylog 7.x; 3.0+ is not supported).

Ingress Controller

By default, the chart exposes a Kubernetes service. However, we also recommend using an Ingress Controller for better management of external traffic. If you set ingress.enabled to true, the chart will provision an Ingress resource for you.

You can use any ingress controller (e.g., NGINX, HAProxy), but make sure it's installed in your cluster beforehand.

cert-manager

You can always bring your own certificates, but using cert-manager can simplify TLS setup and certificate renewal considerably.

Make sure you have Ingress Controller installed, and that ingress.enabled is set to true. Then, configure ingress.web.tls and ingress.config.issuer with the name of an existing Issuer resource, and let cert-manager do the rest!

Installation

Pre Installation

  1. If Argo CD or Flux manages this release, create the Graylog Secret before you install the chart. Then set global.existingSecretName to the name of that Secret. Make sure that the Secret contains every required key in the Graylog Secrets guide. The optional keys in that guide are only necessary for the features that use them.
  2. An external Secret requires an external MongoDB. Set mongodb.communityResource.enabled=false and put the connection string in GRAYLOG_MONGODB_URI. The chart refuses to render an external Secret together with the bundled MongoDB. See examples/values-existing-secret-external-mongodb.yaml for a complete example.

[!CAUTION] Chart-generated credentials can change after the first deployment when a GitOps controller renders the chart. An externally managed Secret prevents this change.

Installing on Kubernetes

Install the official MongoDB Kubernetes Operator using Helm

helm upgrade --install mongodb-kubernetes-operator mongodb-kubernetes \
  --repo https://mongodb.github.io/helm-charts --version "1.6.1" \
  --set operator.watchNamespace="*" --reuse-values \
  --namespace operators --create-namespace

Install the official Graylog Helm chart

# add the repo
helm repo add graylog https://graylog2.github.io/graylog-helm
helm repo update
# install the chart
helm install graylog graylog/graylog -n graylog --create-namespace

That's it!

Installing on AWS EKS

When installing this chart on an existing Amazon Elastic Kubernetes Service (EKS) cluster on AWS, you must enable the Amazon EBS CSI Driver add-on in your cluster to provision persistent volumes. The Amazon EBS CSI plugin requires Identity and Access Management (IAM) permissions to make calls to AWS APIs on your behalf, so be sure to create the corresponding IAM role, or attach the AmazonEBSCSIDriverPolicy to your existing role.

Install the official MongoDB Kubernetes Operator using Helm

helm upgrade --install mongodb-kubernetes-operator mongodb-kubernetes \
  --repo https://mongodb.github.io/helm-charts --version "1.6.1" \
  --set operator.watchNamespace="*" --reuse-values \
  --namespace operators --create-namespace

Install the official Graylog Helm chart

When deploying to Amazon EKS, use the --set provider=aws option to enable AWS-specific configurations:

# add the repo
helm repo add graylog https://graylog2.github.io/graylog-helm
helm repo update

# install the chart
helm install graylog graylog/graylog --namespace graylog --create-namespace --set provider=aws

When this option is set, the chart configures a custom gp3 StorageClass optimized for Amazon EBS volumes, and applies it to all PVCs managed by this chart.

Alternatively, you may also specify another existing StorageClass (e.g., gp2), if available in your cluster:

helm install graylog graylog/graylog --namespace graylog --create-namespace --set provider=aws --set global.storageClass=gp2

[!NOTE] For EKS clusters version 1.30 and later, Amazon EKS no longer includes the "default" annotation on the gp2 StorageClass resource for newly created clusters. It may still be present in the cluster, but it's not marked as the default storage class anymore.

The gp3 volume type is recommended for most Amazon EBS workloads because it offers better performance and cost efficiency than gp2, as well as independent scaling of IOPS and throughput, and higher performance limits.

Post-Installation

Set root Graylog password

Graylog is installed with a random password by default. It is stored in the release's backup Secret, which survives upgrades and uninstalls, and can be printed at any time:

kubectl get secret graylog-backup-secret --namespace graylog -o jsonpath="{.data.graylog-root-password}" | base64 -d

If you set graylog.config.rootPassword (or use global.existingSecretName), the chart stores only the SHA-256 hash of the password and you are responsible for keeping the plaintext. We recommend setting a persistent password once all pods achieve the RUNNING state using the following command:

echo "Enter your new password and press return:" && read -s pass
helm upgrade graylog graylog/graylog --namespace graylog --reuse-values --set "graylog.config.rootPassword=$pass"; unset pass

Reset a lost root password

If the password is lost and you cannot set a new one through Helm (for example when your values are managed by GitOps), patch the new password's SHA-256 into both Secrets and restart Graylog:

These patch the Secrets' data field, so the value is base64 here — unlike an externally managed Secret, which uses stringData and takes plain text. Both printf '%s' calls matter: echo would append a newline and the hash would not match.

PASS="your-new-password"
# macOS: shasum -a 256 instead of sha256sum, and plain `base64` (no -w flag).
SHA=$(printf '%s' "$PASS" | sha256sum | awk '{print $1}')
SHA64=$(printf '%s' "$SHA" | base64 -w0)
kubectl patch secret graylog-secrets --namespace graylog -p "{\"data\":{\"GRAYLOG_ROOT_PASSWORD_SHA2\":\"$SHA64\"}}"
kubectl patch secret graylog-backup-secret --namespace graylog -p "{\"data\":{\"graylog-root-password-sha2\":\"$SHA64\"}}"
kubectl rollout restart statefulset graylog --namespace graylog

Do not delete the Secrets to force a reset. The backup Secret also holds the password pepper (graylog-secret), and losing that invalidates every stored user credential.

Set external access

There are a number of ways to enable external access to the Graylog application. We recommend using an Ingress Controller to provide external access both to the Graylog UI and the Graylog API, as well as any configured inputs.

Once an Ingress Controller has been installed and configured, run the following command to provision the appropriate Ingress resource:

helm upgrade graylog graylog/graylog -n graylog --set ingress.enabled="true" --set ingress.web.enabled="true" --reuse-values

Alternative: LoadBalancer Service

Alternatively, external access can be configured directly through the provided service without the need for any pre-existing dependencies.

helm upgrade graylog graylog/graylog -n graylog --set graylog.service.type="LoadBalancer" --reuse-values

Override the public URI

The chart gives Graylog a public URI in GRAYLOG_HTTP_EXTERNAL_URI. Browsers and API clients use this URI. The chart reads it from the Ingress hostname or from the LoadBalancer Service address.

These two sources are not always correct. The public URI differs from them in these cases:

  • Graylog is behind a path prefix, such as https://example.com/graylog/.
  • An external proxy or CDN answers on a different name.
  • TLS ends outside the cluster, so

Deploy graylog with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has graylog on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgraylog is pinned at v2.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply