clickhouse

by Helm

Helm chartv1.0.1App 19.14

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.

ParameterDescriptionDefault
timezoneWorld time and date for cities in all time zonesAsia/Shanghai
clusterDomainKubernetes cluster domaincluster.local
affinityClickhouse Node selectors and tolerations for pod assignmentnil
clickhouse.podManagementPolicyStatefulSet controller supports relax its ordering guarantees while preserving its uniqueness and identity guaranteesParallel
clickhouse.updateStrategyStatefulSet controller supports automated updates. There are two valid update strategies: RollingUpdate and OnDeleteRollingUpdate
clickhouse.rollingUpdatePartitionPartition update strategynil
clickhouse.pathThe path to the directory containing data/var/lib/clickhouse
clickhouse.http_portThe port for connecting to the server over HTTP8123
clickhouse.tcp_portPort for communicating with clients over the TCP protocol9000
clickhouse.interserver_http_portPort for exchanging data between ClickHouse servers9009
clickhouse.replicasThe instance number of Clickhouse3
clickhouse.imageDocker image for Clickhouseyandex/clickhouse-server
clickhouse.imageVersionDocker image version for Clickhouse19.14
clickhouse.imagePullPolicyImage pull policy. One of Always, Never, IfNotPresentIfNotPresent
clickhouse.livenessProbe.enabledTurn on and off liveness probetrue
clickhouse.livenessProbe.initialDelaySecondsDelay before liveness probe is initiated30
clickhouse.livenessProbe.periodSecondsHow often to perform the probe30
clickhouse.livenessProbe.timeoutSecondsWhen the probe times out5
clickhouse.livenessProbe.failureThresholdMinimum consecutive successes for the probe3
clickhouse.livenessProbe.successThresholdMinimum consecutive failures for the probe1
clickhouse.readinessProbe.enabledTurn on and off readiness probetrue
clickhouse.readinessProbe.initialDelaySecondsDelay before readiness probe is initiated30
clickhouse.readinessProbe.periodSecondsHow often to perform the probe30
clickhouse.readinessProbe.timeoutSecondsWhen the probe times out5
clickhouse.readinessProbe.failureThresholdMinimum consecutive successes for the probe3
clickhouse.readinessProbe.successThresholdMinimum consecutive failures for the probe1
clickhouse.persistentVolumeClaim.enabledEnable persistence using a PersistentVolumeClaimfalse
clickhouse.persistentVolumeClaim.dataPersistentVolume.enabledTurn on and off dataPersistentVolumefalse
clickhouse.persistentVolumeClaim.dataPersistentVolume.accessModesPersistent Volume Access Modes[ReadWriteOnce]
clickhouse.persistentVolumeClaim.dataPersistentVolume.storageClassNamePersistent Volume Storage Class``
clickhouse.persistentVolumeClaim.dataPersistentVolume.storagePersistent Volume Size500Gi
clickhouse.persistentVolumeClaim.logsPersistentVolume.enabledTurn on and off dataPersistentVolumefalse
clickhouse.persistentVolumeClaim.logsPersistentVolume.accessModesPersistent Volume Access Modes[ReadWriteOnce]
clickhouse.persistentVolumeClaim.logsPersistentVolume.storageClassNamePersistent Volume Storage Class``
clickhouse.persistentVolumeClaim.logsPersistentVolume.storagePersistent Volume Size50Gi
clickhouse.ingress.enabledEnable ingressfalse
clickhouse.ingress.hostIngress host``
clickhouse.ingress.pathIngress path``
clickhouse.ingress.tls.enabledEnable ingress tlsfalse
clickhouse.ingress.tls.hostsIngress tls hosts[]
clickhouse.ingress.tls.secretNameIngress tls secretName``
clickhouse.configmap.enabledIf Configmap's enabled is true, Custom config.xml, metrica.xml and users.xmltrue
clickhouse.configmap.max_connectionsThe maximum number of inbound connections4096
clickhouse.configmap.keep_alive_timeoutThe number of seconds that ClickHouse waits for incoming requests before closing the connection3
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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartclickhouse is pinned at v1.0.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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