Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 2.23 KB

introduction.md

File metadata and controls

41 lines (32 loc) · 2.23 KB

ClickHouse Operator Introduction

Prerequisites

You may need to have the following items in order to have ClickHouse installation in k8s

  1. Persistent Volumes
  2. Zookeeper

Persistent Volumes

ClickHouse needs disk space to keep data. Kubernetes provides Persistent Volumes for this purpose. As it is stated

A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator.

This means that we have to do some homework in order to provide Persistent Volumes to ClickHouse installation. PVs can be provided by:

  1. system administrator, who is in charge of k8s installation, can prepare required number of PVs
  2. Persistent Volume Provisioner, which may be set up in k8s installation in order to provision volumes dynamically

When ClickHouse required some disk storage, in places Persistent Volume Claim which specifies desired storage class and size. Each Persistent Volume has class assigned and size provisioned. So the main bond between software and disk to be provisioned is Storage Class.

Zookeeper

In case we'd like to have data replication in ClickHouse, we need to have Zookeeper instance accessible by ClickHouse. There is no requirement to have Zookeeper instance dedicated to serve ClickHouse replication, we just need to have access to running Zookeeper. However, in case we'd like to have high-available ClickHouse installation, we need to have Zookeeper cluster of at least 3 nodes. So, we can either use

  1. Already existing Zookeeper instance, or
  2. Setup our own Zookeeper - in most cases inside the same k8s installation.