Quick Start Guide

Setting up a ClickHouse® cluster quickly with the Altinity Kubernetes Operator

If you’re running the Altinity Kubernetes Operator for ClickHouse® for the first time, or just want to get it up and running as quickly as possible, the Quick Start Guide is for you.

As the name “Quick Start” implies, we’re not building anything that you should put into production. The section Configuring the Operator covers some of the operator’s most used options. But we’ll keep it simple here. Get things up and running first, then add more features to your cluster once the basics are in place.

Requirements

  • A Kubernetes cluster (v1.19.0 or later), with kubectl configured to access it and the operator installed

(See the operator install instructions if you haven’t installed the operator already.)

That’s all! It doesn’t matter where or how your Kubernetes cluster is running. This guide has been tested with clusters hosted on several platforms:

That being said, the instructions in this tutorial should work with any Kubernetes provider.

You probably also want to install the clickhouse-client utility. You can use the copy of clickhouse-client that’s included in the ClickHouse server’s container image, but it’s handy to install it directly on your machine. Full instructions for installing clickhouse-client are on the ClickHouse Client installation page.

Our starting point

We’ll start with a running Kubernetes cluster that has the operator installed and kubectl configured to talk to it. With those steps behind you, you’re ready to go!


Creating your first ClickHouse® cluster

How to create a cluster and make sure it’s running

Adding Persistent Storage to Your Cluster

Making sure your data stays if your pods go away

Enabling Replication

Adding replication to your ClickHouse® cluster

Working with Replication

Using the ReplicatedMergeTree engine

Bonus: Adding a Shard to your ClickHouse® Cluster

Enabling horizontal scaling once you’ve got 5 TB of data or so