Skip to main content
Version 3.0

Fast analytics with ClickHouse,
from the first test to the replicated cluster.

Six common scenarios, from the first installation to shards and replicas. Each one covers: what the chart already provides, what changes in the cluster, the values file commented line by line, and a step-by-step with verification.

ChartVersion3.0.3TypeapplicationAppVersion25.8.11.66
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+
Feature SupportLDAPsupportedS3supportedIngresssupportedGateway APIsupported

The tdp-clickhouse chart starts a ClickHouse cluster declared in a ClickHouseInstallation resource, which the Altinity operator from the tdp-operator chart turns into pods, persistent volumes and an internal Service for the HTTP interface and native protocol. Cluster size, access and security are your choices, and each scenario below covers one of them. For the architecture, see ClickHouse - Concepts.

Your environment

If you fill in your environment details here, this page's examples and commands use the values you provided. The namespace, the release name and the values file are your choices, not the chart's.

Scenarios​

Check prerequisites, install with chart defaults and open the Play UI from your machine.

You want to see ClickHouse working before deciding on size, access or security. TDP's ClickHouse depends on an Altinity operator that runs once in the cluster, installed by the tdp-operator chart, and the ClickHouseInstallation CRD from the tdp-crds chart. With these ready and the registry pull Secret in the namespace, install the chart without a values file, check that the cluster is up and open the Play UI from your machine. Everything shown here is what the chart provides on its own. The other scenarios start from this state.

Before starting

The tdp-registry pull Secret in the release namespace, with your TDP registry credentials. Create it before installing.

Cluster

A ClickHouseInstallation in the chart's default topology, with one persistent volume per pod in the cluster's default StorageClass.

Operator

Altinity from tdp-operator, once per cluster. This chart's embedded operator (operator.enabled) is disabled by default. Enable it only for an isolated installation, without tdp-operator in the cluster.

Release name

tdp-clickhouse itself or a name that contains it. The ClickHouseInstallation receives the release name, and the Service expected by the Ingress, installation notes and grants Job, clickhouse-<RELEASE_NAME>, then matches the one the operator creates.

Default user

The administrator, with the temporary password ChangeMe!T3c, the same default password as the TDP charts. Only accepts connections from inside the pod.

Access

Internal clickhouse-<RELEASE_NAME> Service, with the HTTP interface, which also serves the Play UI and Dashboard, and the native protocol. No Ingress or Gateway API.

Cleanup

Enabled (cleanup.enabled): when the release is removed, a Job deletes the ClickHouseInstallation and its StatefulSets, pods and Services. Data volumes remain in the cluster, and a new installation with the same release name finds the old databases.

What starts with the chart defaults

namespace <NAMESPACE>operator namespacereconcilesport-forwardApplicationstdpuser or your own userServiceclickhouse-<RELEASE_NAME>ClickHouseInstallationrelease nameClickHouse podone shard, one replicaPVCone per podPassword Secret<RELEASE_NAME>-credentialsAltinity Operatortdp-operatorWho uses the Play UIport-forward
  1. Applications and tools. Clients in other pods, such as Trino, Superset and CloudBeaver, connect through the Service, with a user that accepts connections from any host: tdpuser or a user you create. The default user only accepts connections from inside the pod. Chart default: tdpuser off. (clickhouse.tdpUser.enabled)
  2. ClickHouse Service. Created by the operator, with a name derived from the release: clickhouse-<RELEASE_NAME>. Serves the HTTP interface, which also serves the Play UI and Dashboard, and the native protocol. The chart's Ingress, HTTPRoute and grants Job expect this name, so the release name must contain the chart name.
  3. ClickHouseInstallation. The resource where the chart declares the cluster. The operator creates pods, the Service and volumes from it. Chart default: on. (clickhouse.enabled)
  4. ClickHouse pods. One pod per replica of each shard. Counts are in clickhouse.shardsCount and clickhouse.replicasCount; CPU and memory in clickhouse.resources. Chart default: one shard, one replica. (clickhouse.shardsCount · clickhouse.replicasCount)
  5. Data volumes. Each pod writes to a persistent volume, sized by clickhouse.persistence.size, in the cluster's default StorageClass or the one defined in clickhouse.persistence.storageClass. Chart cleanup preserves volumes, and they remain in the cluster after helm uninstall. Chart default: persistence enabled. (clickhouse.persistence)
  6. Default user password. The chart stores the default user's password in this Secret, from clickhouse.defaultUser.password, unless clickhouse.defaultUser.password_secret_name points to your own Secret with the password key. Chart default: temporary password ChangeMe!T3c. (clickhouse.defaultUser.password)
  7. Altinity operator. A single operator per cluster, installed by the tdp-operator chart, which reconciles ClickHouseInstallation resources in all namespaces. The operator embedded in this chart is disabled by default and only serves an isolated installation without tdp-operator in the cluster. The operator's own configuration is in tdp-operator. Chart default: embedded operator off. (operator.enabled)
  8. Play UI and Dashboard. Without external exposure, each person opens a tunnel from their own machine to the Service with kubectl port-forward. Chart default: no external exposure.
What starts with the chart defaults. Click an element to see what it is and its corresponding default.

Check the TDP license

The chart requires a valid TDP license installed in the cluster.

Terminal input
kubectl get platformlicenses -A

Success when

The license appears in the list. If it does not, install the tdp-license chart before continuing (Licensing Configuration).

Check the Altinity operator

The operator comes from the operators chart, installed once per cluster, after the CRDs chart.

Terminal input
kubectl -n <OPERATOR_NAMESPACE> get pods -l app.kubernetes.io/name=altinity-clickhouse-operator

Success when

The operator pod appears in the tdp-operator namespace. If it does not, follow the Installation through Helm order: tdp-crds, then tdp-operator (Operator Configuration).
If the cluster has an older ClickHouse installation

ClickHouse releases installed before release 3.0.2 include the embedded operator, and installing tdp-operator alongside them fails. First follow the ClickHouse operator migration.

Create the pull Secret in the namespace

The tdp-registry Secret must exist in the release namespace before installation.

Terminal input
kubectl -n <NAMESPACE> create secret docker-registry tdp-registry \
--docker-server=registry.tecnisys.com.br \
--docker-username=<REGISTRY_USERNAME> --docker-password=<REGISTRY_CLI_SECRET>

Success when

The Secret appears with kubectl -n <NAMESPACE> get secret tdp-registry. Registry credentials are in Prerequisites.
If the namespace does not exist yet

Create the namespace before the Secret:

Terminal input
kubectl create namespace <NAMESPACE>

Install with defaults

Without a values file, the chart starts exactly as in the figure above.

Terminal input
helm upgrade --install <RELEASE_NAME> \
oci://registry.tecnisys.com.br/tdp/charts/tdp-clickhouse \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace

Without --version, Helm installs the latest published chart version. With it, Helm installs the indicated version, the one for this documentation.

Success when

Terminal input
kubectl -n <NAMESPACE> get chi,pods,svc -l clickhouse.altinity.com/chi

The ClickHouseInstallation appears with the release name, the pod reaches Running and the clickhouse-<RELEASE_NAME> Service exists.

If the pod does not start

The namespace events, in time order, show the reason:

Terminal input
kubectl -n <NAMESPACE> get events --sort-by=.lastTimestamp

Then look up the message in When something goes wrong.

Connect as administrator

clickhouse-client runs inside the pod, where the default user is accepted.

Terminal input
kubectl -n <NAMESPACE> exec -it chi-<RELEASE_NAME>-<RELEASE_NAME>-0-0-0 -- clickhouse-client --password '<PASSWORD>'

Success when

The clickhouse-client prompt opens with the password from clickhouse.defaultUser.password, the temporary ChangeMe!T3c by default, or the one stored in the Secret indicated in clickhouse.defaultUser.password_secret_name. The pod name above applies to a release with the recommended name; kubectl -n <NAMESPACE> get pods -l clickhouse.altinity.com/chi shows the actual name.

Before using the cluster for anything beyond testing, set your own password: scenario 1 of Security - ClickHouse.

Open the Play UI from your machine

Without external exposure, kubectl opens a tunnel from your machine to the Service's HTTP interface.

Terminal input
kubectl -n <NAMESPACE> port-forward svc/clickhouse-<RELEASE_NAME> 8123:8123

Success when

With port-forward active, the Play UI and Dashboard open in the browser at these addresses:

Example
http://127.0.0.1:8123/play
http://127.0.0.1:8123/dashboard

From the command line, the query below returns 1:

Terminal input
curl -u 'default:<PASSWORD>' "http://localhost:8123/?query=SELECT%201"

For clickhouse-client on your machine, the tunnel goes to the native protocol port:

Terminal input
kubectl -n <NAMESPACE> port-forward svc/clickhouse-<RELEASE_NAME> 9000:9000

Note the application address

This is the address clients in other pods configure.

Inside the cluster, applications use the Service, with the chosen interface's port and a user that accepts connections from any host, such as tdpuser (scenario 3 of Security - ClickHouse):

Example
# HTTP
clickhouse-<RELEASE_NAME>.<NAMESPACE>.svc.cluster.local:8123

# Native
clickhouse-<RELEASE_NAME>.<NAMESPACE>.svc.cluster.local:9000

When something goes wrong​

Troubleshooting

Paste the error message or choose the symptom. The answer comes with the cause, what to do and the command.

  1. Installation refused: license check failed. Cause: The TDP license is missing or invalid in the cluster. What to do: Check the license with the command below. If it is not VALID, install or renew it (License Configuration) and repeat the installation.
  2. Pods in ImagePullBackOff or ErrImagePull. Cause: The tdp-registry pull Secret is missing from the release namespace, or its credentials are invalid: images from the Tecnisys registry require login. What to do: Create the tdp-registry Secret in the release namespace with your registry credentials (scenario 1, First contact), and repeat the installation.
  3. The ClickHouseInstallation resource is not recognized. Cause: The ClickHouseInstallation CRD must be registered in the cluster before helm install of this chart. What to do: Install the CRDs chart and run the ClickHouse helm upgrade --install again.
  4. The ClickHouseInstallation exists, but no pods appear. Cause: No Altinity operator in the cluster: without it, the ClickHouseInstallation is not reconciled and pods are not created. What to do: Install tdp-operator, once per cluster, in the <OPERATOR_NAMESPACE> namespace.
  5. Rendering error: When 'clickhouse.replicasCount' > 1 .... Cause: More than one replica per shard requires ClickHouse Keeper. What to do: Enable keeper.enabled in the same values file, as in scenario 3.
  6. Rendering error: tdpUser.password is required. Cause: The tdpuser is enabled with an empty password. What to do: Set clickhouse.tdpUser.password in a private values file.
  7. Pods in Pending. Cause: There is no default StorageClass in the cluster, or the one defined in clickhouse.persistence.storageClass does not exist or has no capacity. What to do: Check the StorageClass and namespace PVCs.
  8. Login through the URL fails: AUTHENTICATION_FAILED. Cause: Requests arriving through an Ingress or Gateway are not local, and the default user only accepts connections from inside the pod. What to do: Log in with tdpuser or another user that accepts any host. See scenario 4 of Security - ClickHouse.
  9. The native client cannot connect through the published URL. Cause: The native protocol does not go through Ingress or Gateway API: only the HTTP interface is published. What to do: For the native protocol, use port-forward or a LoadBalancer or NodePort Service.
  10. Grants Job fails: Timeout waiting for ready endpoints. Cause: The Job looks for the clickhouse-<RELEASE_NAME> Service and cannot find a ready pod behind it: the pods have not started yet, or the release name does not contain the chart name and the Service created by the operator has another name. What to do: Check the real names of the ClickHouseInstallation, the pods, and the Service, and the Job logs while it exists.
  11. After reinstalling, the old databases are still there. Cause: helm uninstall keeps the data volumes, and a new installation with the same release name finds them again. What to do: To start from scratch, delete the data PVCs after uninstalling. This permanently deletes the ClickHouse data.
  12. Another problem. Cause: Start with the ClickHouseInstallation and pod status, and the operator and ClickHouse logs. What to do: The operator runs in the namespace of tdp-operator. ClickHouse pods carry the ClickHouseInstallation label.

What remains after uninstalling​

To uninstall, run helm -n <NAMESPACE> uninstall <RELEASE_NAME>. Before removal, the cleanup Job deletes the ClickHouseInstallation and its associated StatefulSets, pods and Services. The operator Deployment is untouched. Data volumes remain in the cluster, and a new installation with the same release name finds the old databases. There is one data PVC per ClickHouse pod, with a name derived from the release. The command below shows the first pod's PVC for a release with the recommended name. To start from scratch, delete them after uninstalling, which permanently deletes the ClickHouse data:

Terminal input
kubectl -n <NAMESPACE> get pvc   # lists data PVCs (and <RELEASE_NAME>-logs-chi-..., with persistence.logs.enabled)
kubectl -n <NAMESPACE> delete pvc <RELEASE_NAME>-data-chi-<RELEASE_NAME>-<RELEASE_NAME>-0-0-0

The removal order for all components and the platform is in Uninstallation.

Lists and XML blocks in the values file​

clickhouse.extraUsers and clickhouse.extraConfig are each a single XML text block. When your values file defines one of them, Helm replaces the entire block with yours, without merging them. Therefore:

  • The chart's extraUsers already includes the <profiles> block for the default profile. When defining your own, repeat that block, as in the examples in Security - ClickHouse.
  • If you need LDAP and S3 storage at the same time, both go in the same extraConfig, inside a single <yandex>.

All parameters​

Filter by name or group. The chart prefix is already filled in. Keys without a prefix are at the values file root.

38 of 38 parameters

ParameterDescriptionChart default
tdp-clickhouse.commonLabelsGeneralLabels applied to resources created by the charttecnisys.io/cluster: tdp
tdp-clickhouse.clickhouse.enabledGeneralDeploys the ClickHouse clustertrue
tdp-clickhouse.operator.enabledGeneralEmbedded Altinity operator (isolated installation only, without the operators chart)false
tdp-clickhouse.cleanup.enabledGeneralCleanup Job before release removaltrue
tdp-clickhouse.clickhouse.image.repositoryImageClickHouse image repositoryregistry.tecnisys.com.br/community/images/clickhouse/clickhouse-server
tdp-clickhouse.clickhouse.image.tagImageClickHouse image tag25.8.11.66
tdp-clickhouse.clickhouse.persistence.enabledStoragePods persistent volumestrue
tdp-clickhouse.clickhouse.persistence.sizeStorageEach pod's volume size5Gi
tdp-clickhouse.clickhouse.persistence.storageClassStorageStorageClass (empty uses the cluster default)""
tdp-clickhouse.clickhouse.persistence.accessModesStorageVolume access modes["ReadWriteOnce"]
tdp-clickhouse.clickhouse.resources.requests.cpuResourcesCPU reserved per pod1
tdp-clickhouse.clickhouse.resources.requests.memoryResourcesMemory reserved per pod2Gi
tdp-clickhouse.clickhouse.resources.limits.cpuResourcesCPU limit per pod2
tdp-clickhouse.clickhouse.resources.limits.memoryResourcesMemory limit per pod4Gi
tdp-clickhouse.clickhouse.shardsCountTopologyShard count1
tdp-clickhouse.clickhouse.replicasCountTopologyReplicas per shard (more than one requires Keeper)1
tdp-clickhouse.clickhouse.antiAffinityTopologyPrevents two ClickHouse pods on the same nodefalse
tdp-clickhouse.keeper.enabledTopologyClickHouse Keeperfalse
tdp-clickhouse.keeper.replicaCountTopologyKeeper pods: odd number, unchanged after initial deployment3
tdp-clickhouse.keeper.localStorage.sizeTopologyEach Keeper pod's volume5Gi
tdp-clickhouse.clickhouse.defaultUser.passwordUsersTemporary password of the default user (replace it)ChangeMe!T3c
tdp-clickhouse.clickhouse.defaultUser.password_secret_nameUsersYour own Secret, with the password key, in place of defaultUser.password""
tdp-clickhouse.clickhouse.tdpUser.enabledUsersCreates the tdpuser (any host, full privileges) through a post-install Jobfalse
tdp-clickhouse.clickhouse.tdpUser.passwordUsersTemporary tdpuser password (replace it)ChangeMe!T3c
tdp-clickhouse.clickhouse.extraUsersUsersAdditional users and profiles (XML)<profiles> block of the default profile
tdp-clickhouse.clickhouse.extraConfigUsersAdditional server configuration (XML): LDAP, S3 storagenot defined
TDP-Settings.s3Connection.enabledS3Job that creates the bucketfalse
TDP-Settings.s3Connection.bucketS3Bucket name""
TDP-Settings.s3Connection.accessKeyS3S3 access key""
TDP-Settings.s3Connection.secretKeyS3S3 secret key""
TDP-Settings.s3Connection.uriS3URI of the S3 endpoint""
TDP-Settings.s3Connection.selfSignedS3S3 endpoint with a self-signed certificatefalse
TDP-Settings.gateway.ingress.enabledExposureRenders the Ingressfalse
TDP-Settings.gateway.gatewayApi.enabledExposureRenders the HTTPRoutefalse
ingress.ingressClassNameExposureIngress class""
ingress.hosts[0].hostExposureIngress hostnameclickhouse.tdp.local
gatewayApi.gateway.enabledExposureCreates its own Gateway (otherwise, uses gatewayApi.parentRefs)false
gatewayApi.clickhouse.hostnames[0]ExposureHTTPRoute hostnameclickhouse.tdp.local

For the complete list, see the chart's values.yaml or run helm show values for the installed version.

Next steps​