ClickHouse connected to the platform:
where the data comes from and who queries it.
The address other components use, S3 storage, and the TDP consumers. Each scenario shows what the chart already provides, the values file commented line by line, and where to configure each consumer.
Components querying ClickHouse, such as Trino, Superset, CloudBeaver and OpenMetadata, configure the ClickHouse Service address and a user accepting connections from other pods in their own charts. On the tdp-clickhouse chart side, integration is storage: a Job preparing an S3 bucket and a policy sending ClickHouse data there. Installation and resources are in ClickHouse Configuration. Users and passwords are in Security - ClickHouse.
Your environment
If you fill in your environment details here, the examples and commands on the page use what you provided. The namespace, the release name and the values file are your choices, not the chart's.
Scenarios
- 1 · How it is accessed
- 2 · S3 storage
- 3 · Trino
- 4 · Superset
- 5 · CloudBeaver
- 6 · OpenMetadata
- 7 · Airflow
The Service, ports and user configured by consumers.
The other components access ClickHouse through the Service address created by the operator, with a name derived from the release, serving the HTTP interface and native protocol.
By default, ClickHouse has only the default user, which only accepts connections from inside the ClickHouse pod; tdpuser, which accepts connections from other pods, is off. So every consumer needs, besides the address, a user accepting connections from other pods. Platform components configure this address and user in their own charts, not this one.
The following scenarios cover S3 storage (scenario 2) and the consumers: Trino, Superset, CloudBeaver, OpenMetadata and Airflow (scenarios 3 to 7).
clickhouse-<RELEASE_NAME>, in the ClickHouse namespace, with the HTTP interface and native protocol.
tdpuser, when enabled (clickhouse.tdpUser.enabled), or a less privileged user you create: scenario 3 of Security - ClickHouse.
The kit integration creates the trino and superset users in ClickHouse. Each password comes from a variable shared with the consumer: TDP_CLICKHOUSE_TRINO_PASSWORD, for example, configures the ClickHouse trino user and Trino's clickhouse catalog.
All consumers through the same Service
- Trino. Configured in the Trino chart, with the ClickHouse Service address and a user accepting connections from other pods.
- Superset. Configured in the Superset chart, with the ClickHouse Service address and a user accepting connections from other pods.
- CloudBeaver. Configured in the CloudBeaver chart, with the ClickHouse Service address and a user accepting connections from other pods.
- OpenMetadata. Configured in the OpenMetadata chart, with the ClickHouse Service address and a user accepting connections from other pods.
- Airflow. Configured in the Airflow chart, with the ClickHouse Service address and a user accepting connections from other pods.
- ClickHouse address. The Service created by the operator, with the HTTP interface and native protocol. Clients sign in with tdpuser or a user you create. Chart default:
tdpuser disabled. (clickhouse.tdpUser.enabled) - Where data is stored. Data is stored on the pods' persistent volumes. Chart default:
no S3 policy. (clickhouse.extraConfig)
# HTTP
clickhouse-<RELEASE_NAME>.<NAMESPACE>.svc.cluster.local:8123
# Native
clickhouse-<RELEASE_NAME>.<NAMESPACE>.svc.cluster.local:9000
Any other client inside the cluster connects the same way: the Service address, the port of its interface, and a user accepting connections from other pods.
Prepare a bucket and write tables to it.
You want ClickHouse to write data to S3-compatible storage. Two pieces, configured in different places, complement each other. The bucket Job, enabled in TDP-Settings.s3Connection, runs before installation and each upgrade. It creates the bucket if missing and the tdp-clickhouse-s3-connection Secret, with connection details. The storage policy, an XML block in clickhouse.extraConfig, declares the bucket as a ClickHouse disk. Keep both consistent: same endpoint, bucket and keys.
Disabled (TDP-Settings.s3Connection.enabled).
No S3 policy: data stays on pod volumes.
The kit integration adds the Ozone S3 Gateway as the ClickHouse ozone disk, in the clickhouse-data bucket, which must exist in Ozone's /s3v volume. With Ozone security enabled, server pods receive the S3 key from the ozone-s3-credentials Secret through AWS_* environment variables, and the ozone disk reads them with from_env: see Ozone security in the GitOps kit.
The bucket and the storage policy
- Trino. Configured in the Trino chart, with the ClickHouse Service address and a user accepting connections from other pods.
- Superset. Configured in the Superset chart, with the ClickHouse Service address and a user accepting connections from other pods.
- CloudBeaver. Configured in the CloudBeaver chart, with the ClickHouse Service address and a user accepting connections from other pods.
- OpenMetadata. Configured in the OpenMetadata chart, with the ClickHouse Service address and a user accepting connections from other pods.
- Airflow. Configured in the Airflow chart, with the ClickHouse Service address and a user accepting connections from other pods.
- ClickHouse address. The Service created by the operator, with the HTTP interface and native protocol. Clients sign in with tdpuser or a user you create. Chart default:
tdpuser disabled. (clickhouse.tdpUser.enabled) - Where data is stored. Tables use pod volumes through the default policy; those requesting the S3 policy write to the bucket. Chart default:
no S3 policy. (clickhouse.extraConfig) - Bucket Job. Runs before installation and each upgrade and creates the bucket if it does not exist yet. Chart default:
disabled. (TDP-Settings.s3Connection.enabled) - S3-compatible storage. The same endpoint and bucket in the Job and ClickHouse policy.
The bucket Job
The block belongs at the values file root, outside the chart prefix. Store keys in a private values file.
1TDP-Settings:2s3Connection:3 enabled: true4 bucket: "<S3_BUCKET>"5 accessKey: "<S3_ACCESS_KEY>"6 secretKey: "<S3_SECRET_KEY>"7 uri: "https://<S3_ENDPOINT>"8 selfSigned: false
Before installation and each upgrade, creates the bucket if missing, and creates the Secret tdp-clickhouse-s3-connection, with connection details.
- Enables the Job (linha 3). Before installation and each upgrade, creates the bucket if missing, and creates the Secret tdp-clickhouse-s3-connection, with connection details.
- Bucket (linha 4). The same bucket as the ClickHouse policy below.
- Keys (linha 5). The S3 storage access key and secret key.
- Endpoint (linha 7). The same endpoint as the ClickHouse policy.
The storage policy
ClickHouse uses the bucket as a disk through this block. extraConfig is a single XML block: if you also configure LDAP, both belong in the same <yandex>.
1tdp-clickhouse:2clickhouse:3 extraConfig: |4 <yandex>5 <storage_configuration>6 <disks>7 <default>8 <keep_free_space_bytes>1073741824</keep_free_space_bytes>9 </default>10 <s3>11 <type>s3</type>12 <endpoint>https://<S3_ENDPOINT>/<S3_BUCKET>/</endpoint>13 <access_key_id><S3_ACCESS_KEY></access_key_id>14 <secret_access_key><S3_SECRET_KEY></secret_access_key>15 <use_https>1</use_https>16 <skip_hostname_verification_for_https>1</skip_hostname_verification_for_https>17 <bucket><S3_BUCKET></bucket>18 <path>data/</path>19 <use_environment_credentials>false</use_environment_credentials>20 <path_style>true</path_style>21 </s3>22 </disks>23 <policies>24 <default>25 <volumes>26 <main>27 <disk>default</disk>28 </main>29 </volumes>30 </default>31 <s3>32 <volumes>33 <main>34 <disk>s3</disk>35 </main>36 </volumes>37 </s3>38 </policies>39 </storage_configuration>40 <openSSL>41 <client>42 <loadDefaultCAFile>false</loadDefaultCAFile>43 <verificationMode>none</verificationMode>44 <invalidCertificateHandler>45 <name>AcceptCertificateHandler</name>46 </invalidCertificateHandler>47 </client>48 </openSSL>49 </yandex>
The disk backed by pod volumes.
- Local disk (linha 7). The disk backed by pod volumes.
- S3 disk (linha 10). The bucket declared as a disk.
- Endpoint and bucket (linha 12). The same as the bucket Job.
- Keys (linha 13). The same keys as the bucket Job.
- Default policy (linha 24). Tables remain on pod volumes unless they request another policy.
- s3 policy (linha 31). The policy tables request to write to the bucket.
Apply to the release
The bucket Job runs before installation or upgrade.
helm upgrade --install <RELEASE_NAME> \
oci://registry.tecnisys.com.br/tdp/charts/tdp-clickhouse \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
If the bucket Job fails
Create a table using the s3 policy
As administrator, inside the pod: the table requests the policy by name.
CREATE TABLE minha_tabela (id UInt64, valor String)
ENGINE = MergeTree()
ORDER BY id
SETTINGS storage_policy = 's3';
Success criteria
s3 policy.You want to query ClickHouse tables with Trino alongside other sources. Trino connects through the clickhouse catalog, configured in the Trino chart with the address from scenario 1 and a ClickHouse user. Nothing changes in ClickHouse.
The values file and procedure are in Integrations - Trino, ClickHouse scenario.
You want to build charts and dashboards with ClickHouse data. Superset registers ClickHouse as a datasource, configured in the Superset chart with the address from scenario 1 and a ClickHouse user. Nothing changes in ClickHouse.
The configuration block is in Integrations - Superset.
You want people to explore ClickHouse through SQL in the browser. The CloudBeaver chart can pre-register the ClickHouse connection with the address from scenario 1 and a ClickHouse user. Nothing changes in ClickHouse.
Configuration is in Integrations - CloudBeaver.
You want ClickHouse databases and tables to appear in the metadata catalog. OpenMetadata registers ClickHouse as a Database Service, configured in the OpenMetadata chart with the address from scenario 1 and a ClickHouse user. Nothing changes in ClickHouse.
The configuration block is in Integrations - OpenMetadata.
You want Airflow DAGs to read or write to ClickHouse. The TDP Airflow image includes ClickHouse Python libraries, ready in task pods. DAGs use the address from scenario 1 and a ClickHouse user. Nothing changes in ClickHouse.
What the image includes is in Integrations - Airflow.
When something goes wrong
Troubleshooting
Paste the error message or choose a symptom. The answer includes the cause, what to do and the command.
- Bucket Job fails: Could not connect to S3 endpoint. Cause: The Job cannot reach the TDP-Settings.s3Connection.uri address from the cluster. What to do: Check the endpoint URI and network between the ClickHouse namespace and S3 storage.
- Consumer receives AUTHENTICATION_FAILED. Cause: The consumer signs in as default, which only accepts connections from inside the ClickHouse pod. What to do: Configure tdpuser or a user you create in the consumer. See scenario 3 of Security - ClickHouse.
- The bucket exists, but ClickHouse does not write to it. Cause: The Job and ClickHouse policy are configured in different places and may point to different endpoints, buckets or keys. What to do: Keep extraConfig consistent with TDP-Settings.s3Connection: same endpoint, bucket and keys.
Integration parameters
Filter by name or group. The chart prefix is already filled in. Keys without a prefix belong at the root of the values file.
8 of 8 parameters
| Parameter | Description | Chart default |
|---|---|---|
TDP-Settings.s3Connection.enabledS3 | Job creating the bucket before installation and each upgrade | false |
TDP-Settings.s3Connection.bucketS3 | Bucket name | "" |
TDP-Settings.s3Connection.accessKeyS3 | S3 access key | "" |
TDP-Settings.s3Connection.secretKeyS3 | S3 secret key | "" |
TDP-Settings.s3Connection.uriS3 | S3 endpoint URI | "" |
TDP-Settings.s3Connection.selfSignedS3 | S3 endpoint with a self-signed certificate | false |
tdp-clickhouse.clickhouse.extraConfigClickHouse | Additional server configuration (XML), with the S3 storage policy | not set |
tdp-clickhouse.clickhouse.tdpUser.enabledClickHouse | Creates tdpuser, the consumers' user | false |
Next steps
Configuration
ClickHouse Configuration
Installation, resources, shards and replicas, and external exposure.