clickhouse
by Helm
ClickHouse is an open source column-oriented database management system capable of real time generation of analytical data reports using SQL queries
About this chart
ClickHouse
ClickHouse is an open source column-oriented database management system capable of real time generation of analytical data reports using SQL queries.
Introduction
This chart bootstraps a ClickHouse replication cluster deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.10+
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
$ helm repo add liwenhe https://liwenhe1993.github.io/charts/
$ helm repo update
$ helm install --name clickhouse liwenhe/clickhouse
These commands deploy Clickhouse on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the clickhouse deployment:
$ helm delete --purge clickhouse
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following tables lists the configurable parameters of the Clickhouse chart and their default values.
| Parameter | Description | Default |
|---|---|---|
timezone | World time and date for cities in all time zones | Asia/Shanghai |
clusterDomain | Kubernetes cluster domain | cluster.local |
affinity | Clickhouse Node selectors and tolerations for pod assignment | nil |
clickhouse.podManagementPolicy | StatefulSet controller supports relax its ordering guarantees while preserving its uniqueness and identity guarantees | Parallel |
clickhouse.updateStrategy | StatefulSet controller supports automated updates. There are two valid update strategies: RollingUpdate and OnDelete | RollingUpdate |
clickhouse.rollingUpdatePartition | Partition update strategy | nil |
clickhouse.path | The path to the directory containing data | /var/lib/clickhouse |
clickhouse.http_port | The port for connecting to the server over HTTP | 8123 |
clickhouse.tcp_port | Port for communicating with clients over the TCP protocol | 9000 |
clickhouse.interserver_http_port | Port for exchanging data between ClickHouse servers | 9009 |
clickhouse.replicas | The instance number of Clickhouse | 3 |
clickhouse.image | Docker image for Clickhouse | yandex/clickhouse-server |
clickhouse.imageVersion | Docker image version for Clickhouse | 19.14 |
clickhouse.imagePullPolicy | Image pull policy. One of Always, Never, IfNotPresent | IfNotPresent |
clickhouse.livenessProbe.enabled | Turn on and off liveness probe | true |
clickhouse.livenessProbe.initialDelaySeconds | Delay before liveness probe is initiated | 30 |
clickhouse.livenessProbe.periodSeconds | How often to perform the probe | 30 |
clickhouse.livenessProbe.timeoutSeconds | When the probe times out | 5 |
clickhouse.livenessProbe.failureThreshold | Minimum consecutive successes for the probe | 3 |
clickhouse.livenessProbe.successThreshold | Minimum consecutive failures for the probe | 1 |
clickhouse.readinessProbe.enabled | Turn on and off readiness probe | true |
clickhouse.readinessProbe.initialDelaySeconds | Delay before readiness probe is initiated | 30 |
clickhouse.readinessProbe.periodSeconds | How often to perform the probe | 30 |
clickhouse.readinessProbe.timeoutSeconds | When the probe times out | 5 |
clickhouse.readinessProbe.failureThreshold | Minimum consecutive successes for the probe | 3 |
clickhouse.readinessProbe.successThreshold | Minimum consecutive failures for the probe | 1 |
clickhouse.persistentVolumeClaim.enabled | Enable persistence using a PersistentVolumeClaim | false |
clickhouse.persistentVolumeClaim.dataPersistentVolume.enabled | Turn on and off dataPersistentVolume | false |
clickhouse.persistentVolumeClaim.dataPersistentVolume.accessModes | Persistent Volume Access Modes | [ReadWriteOnce] |
clickhouse.persistentVolumeClaim.dataPersistentVolume.storageClassName | Persistent Volume Storage Class | `` |
clickhouse.persistentVolumeClaim.dataPersistentVolume.storage | Persistent Volume Size | 500Gi |
clickhouse.persistentVolumeClaim.logsPersistentVolume.enabled | Turn on and off dataPersistentVolume | false |
clickhouse.persistentVolumeClaim.logsPersistentVolume.accessModes | Persistent Volume Access Modes | [ReadWriteOnce] |
clickhouse.persistentVolumeClaim.logsPersistentVolume.storageClassName | Persistent Volume Storage Class | `` |
clickhouse.persistentVolumeClaim.logsPersistentVolume.storage | Persistent Volume Size | 50Gi |
clickhouse.ingress.enabled | Enable ingress | false |
clickhouse.ingress.host | Ingress host | `` |
clickhouse.ingress.path | Ingress path | `` |
clickhouse.ingress.tls.enabled | Enable ingress tls | false |
clickhouse.ingress.tls.hosts | Ingress tls hosts | [] |
clickhouse.ingress.tls.secretName | Ingress tls secretName | `` |
clickhouse.configmap.enabled | If Configmap's enabled is true, Custom config.xml, metrica.xml and users.xml | true |
clickhouse.configmap.max_connections | The maximum number of inbound connections | 4096 |
clickhouse.configmap.keep_alive_timeout | The number of seconds that ClickHouse waits for incoming requests before closing the connection | 3 |
clickhouse.configmap.max_concurrent_queries |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartclickhouse is pinned at v1.0.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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