Skip to main content
This guide walks you through setting up a production-ready ClickHouse cluster on Kubernetes using the Altinity ClickHouse Operator.
It also includes steps to test data persistence and connectivity to ensure your deployment is reliable.

Prerequisites

Before starting, ensure the following tools and components are installed:

Step 1: Install ClickHouse Operator

The Altinity ClickHouse Operator manages ClickHouse clusters declaratively via CRDs (Custom Resource Definitions).

Install via Helm

Install or upgrade the operator in one step (safe to re-run on upgrades):
The chart name in the Altinity repo is clickhouse-operator. If your Helm version or mirror lists it differently, use helm search repo altinity to confirm the exact chart name.
To verify installation:
You should see something like:

Step 2: Create ClickHouse Cluster

1

Generate password for your default user

2

Create ClickHouse Cluster

Create a file named clickhouse-cluster.yaml with the following content:
clickhouse-cluster.yaml
3

Apply the manifest

4

Verify the cluster is running

Wait until the pods are running:
Expected output:
chi prefix stands for ClickHouseInstallation (CRD name defined by the Altinity Operator).

Step 3: Verify ClickHouse Cluster Health

Run the following command:
If you see “Ready for connections”, your ClickHouse node is healthy.

Step 4: Connect to ClickHouse

Then connect via the HTTP interface:
Expected response:

Step 5: Test Persistence

To verify that your data persists across pod restarts:
1

Insert some data

2

Delete the pod

3

Wait for it to restart

4

Reconnect and check the data

✅ If you still see all inserted rows - persistence is working properly.

Step 6: Cleanup or Reinstall

If you need to reinstall or reset everything:
Deleting PVCs will erase all stored data if reclaim policy is not set to Retain.

Step 7: Common Testing Commands


Step 8: SuprSend Helm Configuration

Once your ClickHouse cluster is set up and running, configure SuprSend to connect to it.
This section shows only the ClickHouse-specific configuration. You must also configure other required secrets and values for SuprSend to work properly. See the complete configuration guide: SuprSend Installation Guide

Kubernetes Secret Configuration

First, add the ClickHouse-specific secrets to your suprsend-secrets.yaml:

Helm Values Configuration

Then add the following to your suprsend-values.yaml (along with other required configuration):
The above configuration goes under global.config section in your suprsend-values.yaml.

Summary

You now have a fully functional ClickHouse cluster running inside Kubernetes with:
  • Persistent 200Gi storage per pod
  • 1 shard × 1 replica layout (easy to scale later)
  • Verified persistence across restarts
  • Easy connectivity via clickhouse-client or HTTP API
  • SuprSend Helm configuration ready
For more advanced setups (multi-shard clusters, backups, monitoring, etc.), refer to:
👉 Altinity ClickHouse Operator Documentation

FAQ

Possible cause: StorageClass not found.Fix: Check that storageClassName matches your cluster’s available storage classes.
Possible cause: Wrong image or insufficient resources.Fix: Check logs with kubectl logs and verify resource limits are adequate.
Possible cause: ClickHouse not yet ready.Fix: Wait until the log shows “Ready for connections” before attempting to connect.
Possible cause: PVC deleted or reclaim policy not set.Fix: Ensure reclaimPolicy: Retain is set on your StorageClass.