clickhouse
by SVTECH-NMAA
Helm chartv0.2.2App 1.16.0Verified publisher
A Helm chart for Kubernetes
About this chart
Clickhouse Chart
This chart defines Clickhouse DB Cluter as Kubernetes objects and it depend on the Clickhouse Operator, which is available at https://docs.altinity.com/clickhouse-operator In detail:
- The ClickHouseKeeperInstallation Object is created to define Keeper (replicas, podTemplate, VolumeClaimTemplates).
- The ClickHouseInstallation Object is created to define the ClickHouse cluster (keeper, replicas, shards, podTemplate, VolumeClaimTemplates).
- The secret named clickhouse-credentials containt password that allow administrators to access to Clickhouse DB.
Tree level
+--- Chart.yaml : Chart information and dependencies (you can use as {{ .Chart }} variable on template files )
+--- README.md
+--- templates : define your template files in this folder
| +--- clickhouseKeeper.yaml
| +--- clickhouse.yaml
| +--- secret.yaml
| +--- *.tpl : define your custom template variable here, and you can create new file .tpl
+--- values.yaml : define {{ .Values }} variable to use in template files
How to use
-
Install Clickhouse Operator:
helm repo add clickhouse-operator https://docs.altinity.com/clickhouse-operator helm upgrade --install --create-namespace \ --namespace clickhouse \ clickhouse-operator \ clickhouse-operator/altinity-clickhouse-operator -
Clone this Charts repo to /opt:
cd /opt git clone https://github.com/svtechnmaa/charts.git -
Edit values.yaml at /opt/charts/kubernetes/clickhouse/values.yaml with the pre configuration parameter is listed:
| Parameter | Description | Default |
|---|---|---|
global.clickhouse.clusterName | Define Clickhouse cluster name, must defined in global to reuse in another charts (like akvorado,...) | clickhouse |
global.clickhouse.replicaCount | Define Clickhouse replication factor, must defined in global to reuse in another charts (like akvorado,...) | 3 |
global.clickhouse.shardCount | Define Clickhouse shard factor, must defined in global to reuse in another charts (like akvorado,...) | 1 |
global.clickhouse.users | Define username-host-password for clickhouse | juniper-0.0.0.0/0-juniper@123 |
-
Start chart alone:
helm install clickhouse /opt/charts/kubernetes/clickhouse \ --namespace clickhouse \ --create-namespace -
Uninstallation:
helm uninstall clickhouse \ --namespace clickhouse
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 v0.2.2 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