clickhouse

by AlertHawk

Helm chartv26.14.0App 26.10.3.7Verified publisher

ClickHouse is an open-source column-oriented OLAP database (Online Analytical Processing) designed for very fast analytical queries on large volumes of data.

About this chart

ClickHouse Helm Chart

A Helm chart for deploying ClickHouse on Kubernetes. ClickHouse is an open-source column-oriented database management system capable of real-time generation of analytical data reports using SQL queries.

Features

  • High Availability: Supports multi-replica deployments with StatefulSet
  • Persistent Storage: Configurable persistent volumes for data and logs
  • Metrics & Monitoring: Built-in Prometheus metrics exporter with optional ServiceMonitor support
  • Web Interface: Optional Tabix web UI for managing ClickHouse
  • Docker Hardened Images (DHI): Optional dhi.io images for a smaller, hardened attack surface
  • Flexible Configuration: Extensive configuration options via values.yaml
  • ZooKeeper / Keeper Support: Optional ZooKeeper or ClickHouse Keeper for replicated tables
  • Ingress Support: Configurable ingress for HTTP access
  • Resource Management: Configurable resource limits and requests

Chart Details

Chart Version26.14
App Version26.10.3.7
Default Imageclickhouse/clickhouse-server:26.10.3.7
DHI Imagedhi.io/clickhouse-server:26.10
Maintainerthiagoloureiro

Installation

Add the Helm repository

helm repo add clickhouse https://thiagoloureiro.github.io/clickhouse.chart/
helm repo update

Install the chart

helm install my-clickhouse clickhouse/clickhouse

Install with custom values

helm install my-clickhouse clickhouse/clickhouse -f my-values.yaml

Configuration

The following table lists the most important configurable parameters and their default values:

ParameterDescriptionDefault
clickhouse.replicasNumber of ClickHouse shards3
clickhouse.imageClickHouse imageclickhouse/clickhouse-server
clickhouse.imageVersionClickHouse image version26.10.3.7
clickhouse.dhi.enabledUse Docker Hardened Images from dhi.iofalse
clickhouse.dhi.imageDHI image repositorydhi.io/clickhouse-server
clickhouse.dhi.imageVersionDHI image tag26.10
clickhouse.imagePullSecretsRegistry pull secrets (required when DHI is enabled)[]
clickhouse.configmap.keeper.enabledDeploy ClickHouse Keeper (required for Replicated* sync)false
clickhouse.configmap.remote_servers.internal_replicationDistributed writes one replica; Replicated* syncstrue
clickhouse.configmap.remote_servers.replica.backup.enabledSecond StatefulSet per shard (clickhouse-replica-*)false
clickhouse.persistentVolumeClaim.enabledEnable persistent volumestrue
clickhouse.persistentVolumeClaim.dataPersistentVolume.storageData volume size100Gi
clickhouse.metrics.enabledEnable Prometheus metricstrue
clickhouse.metrics.portMetrics port9116
tabix.enabledEnable Tabix web UIfalse
timezoneTimezone for the clusterUTC

For a complete list of configuration options, see values.yaml.

Docker Hardened Images (DHI)

By default the chart uses the official ClickHouse image. To switch to Docker Hardened Images, enable DHI and provide an imagePullSecrets entry authenticated against dhi.io.

# Create a pull secret for dhi.io (Docker Hub credentials work)
kubectl create secret docker-registry dhi-registry \
  --docker-server=dhi.io \
  --docker-username=<DOCKER_USER> \
  --docker-password=<DOCKER_PAT>
helm install clickhouse clickhouse/clickhouse \
  --set clickhouse.dhi.enabled=true \
  --set clickhouse.imagePullSecrets[0]=dhi-registry

Or in values:

clickhouse:
  dhi:
    enabled: true
  imagePullSecrets:
    - dhi-registry

When dhi.enabled is true, ClickHouse and Keeper pods pull dhi.io/clickhouse-server:26.10. Install fails if imagePullSecrets is empty.

Replication / HA

Cluster membership alone does not sync table data. For real replica sync:

  1. Enable Keeper (or external ZooKeeper)
  2. Enable the backup StatefulSet (remote_servers.replica.backup.enabled)
  3. Keep internal_replication: true (default)
  4. Create tables with ReplicatedMergeTree (or similar) using {shard} / {replica} macros
helm install clickhouse clickhouse/clickhouse \
  --set clickhouse.configmap.keeper.enabled=true \
  --set clickhouse.configmap.remote_servers.replica.backup.enabled=true

Example table:

CREATE TABLE events ON CLUSTER '{cluster}'
(
  id UInt64,
  ts DateTime
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/events', '{replica}')
PARTITION BY toYYYYMM(ts)
ORDER BY (id, ts);

Macros {cluster}, {shard}, and {replica} are injected automatically (cluster = release fullname).

Examples

Basic Installation

helm install clickhouse clickhouse/clickhouse

Installation with Custom Replicas

helm install clickhouse clickhouse/clickhouse \
  --set clickhouse.replicas=5

Installation with Tabix UI

helm install clickhouse clickhouse/clickhouse \
  --set tabix.enabled=true

Installation with Custom Storage

helm install clickhouse clickhouse/clickhouse \
  --set clickhouse.persistentVolumeClaim.dataPersistentVolume.storage=500Gi

Installation with Prometheus ServiceMonitor

helm install clickhouse clickhouse/clickhouse \
  --set clickhouse.metrics.serviceMonitor.enabled=true

Accessing ClickHouse

HTTP Interface

The HTTP interface is available on port 8123:

# Port forward to access locally
kubectl port-forward svc/clickhouse 8123:8123

# Query via HTTP
curl 'http://localhost:8123/?query=SELECT%201'

Native TCP Interface

The native TCP interface is available on port 9000:

# Port forward to access locally
kubectl port-forward svc/clickhouse 9000:9000

Tabix Web UI

If Tabix is enabled, you can access it via port forwarding or ingress:

# Port forward to access locally
kubectl port-forward svc/clickhouse-tabix 8080:80

Then open http://localhost:8080 in your browser.

Upgrading

helm upgrade clickhouse clickhouse/clickhouse

Uninstalling

helm uninstall clickhouse

Note: This will delete all resources including persistent volumes. Make sure to backup your data before uninstalling.

Development

Building and Publishing

To create a new version of the chart:

./create-version.sh

This script will:

  1. Package the Helm chart
  2. Update the repository index
  3. Prepare the chart for publishing to GitHub Pages

Resources

License

This Helm chart is provided as-is. Please refer to the ClickHouse license for the database software itself.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and questions, please open an issue on the GitHub repository.

Deploy clickhouse with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has clickhouse 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 chartclickhouse is pinned at v26.14.0 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