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.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:Step 4: Connect to ClickHouse
- Option 1: Using kubectl port-forward
- Option 2: Using clickhouse-client
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
Step 6: Cleanup or Reinstall
If you need to reinstall or reset everything: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 yoursuprsend-secrets.yaml:
Helm Values Configuration
Then add the following to yoursuprsend-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-clientor HTTP API - SuprSend Helm configuration ready
👉 Altinity ClickHouse Operator Documentation
FAQ
Pods stuck in Pending
Pods stuck in Pending
Possible cause: StorageClass not found.Fix: Check that
storageClassName matches your cluster’s available storage classes.Pod restarting repeatedly
Pod restarting repeatedly
Possible cause: Wrong image or insufficient resources.Fix: Check logs with
kubectl logs and verify resource limits are adequate.Can't connect via port-forward
Can't connect via port-forward
Possible cause: ClickHouse not yet ready.Fix: Wait until the log shows “Ready for connections” before attempting to connect.
Data lost after restart
Data lost after restart
Possible cause: PVC deleted or reclaim policy not set.Fix: Ensure
reclaimPolicy: Retain is set on your StorageClass.