Multi K8S cluster/region support

Open
#144 0 comments 2 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
clickhouse, go, kubernetes

Research direction

Start by tracing how the operator configures clickhouse-keeper and clickhouse-server deployments and cluster settings; no source files or tests are named in the issue. Compare the requested base-cluster and attached-cluster model with the legacy Bitnami chart configuration shown. Done means supporting separate deployments across Kubernetes clusters or regions with the required cross-cluster Keeper and server configuration.

Written by the indexing model from the issue text.

Description

feature
Company or project name

No response

Use case

Creating a multi K8S cluster setup, where clusters may be located via sufficiently fast/close links for redundancy in case of complete datacenter failure for self hosters.

Describe the solution you'd like

Allow to create a base cluster and attach other clusters to it with separate deployments for clickhouse-keeper and clickhouse-server. Right now using the legacy bitnami charts, I can do such setup by overriding the cluster config and specifying all instances.
EG

               <server>
                    <id>0</id>
                    <hostname>clickfuse-clickhouse-keeper-0.clickfuse-clickhouse-keeper-headless.langfuse.svc.k8s-cluster.datacenter1</hostname>
                    <port from_env="CLICKHOUSE_KEEPER_RAFT_PORT"></port>
                </server>
                <server>
                    <id>1</id>
                    <hostname>clickfuse-clickhouse-keeper-1.clickfuse-clickhouse-keeper-headless.langfuse.svc.ik8s-cluster.datacenter1</hostname>
                    <port from_env="CLICKHOUSE_KEEPER_RAFT_PORT"></port>
                </server>
                <server>
                    <id>2</id>
                    <hostname>clickfuse-clickhouse-keeper-2.clickfuse-clickhouse-keeper-headless.langfuse.svc.k8s-cluster.datacenter1</hostname>
                    <port from_env="CLICKHOUSE_KEEPER_RAFT_PORT"></port>
                </server>
                <server>
                    <id>3</id>
                    <hostname>clickfuse-clickhouse-keeper-0.clickfuse-clickhouse-keeper-headless.langfuse.svc.ik8s-cluster.datacenter2</hostname>
                    <port from_env="CLICKHOUSE_KEEPER_RAFT_PORT"></port>
                </server>
                <server>
                    <id>4</id>
                    <hostname>clickfuse-clickhouse-keeper-1.clickfuse-clickhouse-keeper-headless.langfuse.svc.k8s-cluster.datacenter2</hostname>
                    <port from_env="CLICKHOUSE_KEEPER_RAFT_PORT"></port>
                </server>
                <server>
                    <id>5</id>
                    <hostname>clickfuse-clickhouse-keeper-2.clickfuse-clickhouse-keeper-headless.langfuse.svc.k8s-cluster.datacenter2</hostname>
                    <port from_env="CLICKHOUSE_KEEPER_RAFT_PORT"></port>
                </server>
                <server>
                    <id>6</id>
                    <hostname>clickfuse-clickhouse-keeper-0.clickfuse-clickhouse-keeper-headless.langfuse.k8s-cluster.datacenter3</hostname>
                    <port from_env="CLICKHOUSE_KEEPER_RAFT_PORT"></port>
                </server>

and a similar config for clickhouse-server

Describe alternatives you've considered

Using the old bitnami charts but upgrading images and adapting scripts

Additional context

Clickhouse deployment used for langfuse

Dominant language
Go
Stars
310
Forks
46
Avg merge
1d 15h
Merged PRs (30d)
21

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ClickHouse/clickhouse-operator

All issues in ClickHouse/clickhouse-operator

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.