Official Kubernetes Operator for ClickHouse®
See the codeThe ClickHouse Operator is a Kubernetes operator that automates the deployment, configuration, and management of ClickHouse clusters and ClickHouse Keeper clusters on Kubernetes. It provides declarative cluster management through custom resources, enabling users to easily create highly-available ClickHouse deployments.
The Operator handles the full lifecycle of ClickHouse clusters, including scaling, upgrades, and configuration management.
kubectl version v1.28.0+For users who want to quickly try the operator:
Install the Custom Resource Definitions(CRD) and operator (Requires cert-manager to issue webhook certificates):
kubectl apply --server-side --force-conflicts -f https://github.com/ClickHouse/clickhouse-operator/releases/latest/download/clickhouse-operator.yaml
helm install clickhouse-operator oci://ghcr.io/clickhouse/clickhouse-operator-helm \
--create-namespace \
-n clickhouse-operator-system
Deploy a sample cluster:
kubectl apply -f https://raw.githubusercontent.com/ClickHouse/clickhouse-operator/refs/heads/main/examples/minimal.yaml
helm install ch oci://ghcr.io/clickhouse/clickhouse-cluster-helm \
--create-namespace \
-n clickhouse
Verify the deployment:
kubectl get clickhouseclusters
kubectl get keeperclusters
kubectl get pods
Build and push your image to the location specified by IMG:
make docker-build docker-push IMAGE_REPO=<some-registry>
NOTE: This image ought to be pushed to the personal registry you specified. And it is required to have access to pull the image from the working environment. Make sure you have the proper permission to the registry if the above commands don’t work.
Install the Custom Resource Definitions(CRD) into the cluster:
make install
Deploy the Manager to the cluster with the image specified by IMG:
make deploy IMAGE_REPO=<some-registry>
NOTE: If you encounter RBAC errors, you may need to grant yourself cluster-admin privileges or be logged in as admin.
The examples/ directory contains various ClickHouse cluster configurations:
To deploy any example:
kubectl apply -f examples/<example-file>.yaml
Delete the APIs(CRDs) from the cluster:
make uninstall
UnDeploy the controller from the cluster:
make undeploy
For more detailed information, see the documentation.
We welcome contributions to the ClickHouse Operator project! Here's how you can help:
Before contributing, please ensure:
make testmake lint(top 30 of 31)
Go
93.7%
Makefile
3.6%
Go Template
1.2%
Official Kubernetes Operator for ClickHouse®
See the codeThe ClickHouse Operator is a Kubernetes operator that automates the deployment, configuration, and management of ClickHouse clusters and ClickHouse Keeper clusters on Kubernetes. It provides declarative cluster management through custom resources, enabling users to easily create highly-available ClickHouse deployments.
The Operator handles the full lifecycle of ClickHouse clusters, including scaling, upgrades, and configuration management.
kubectl version v1.28.0+For users who want to quickly try the operator:
Install the Custom Resource Definitions(CRD) and operator (Requires cert-manager to issue webhook certificates):
kubectl apply --server-side --force-conflicts -f https://github.com/ClickHouse/clickhouse-operator/releases/latest/download/clickhouse-operator.yaml
helm install clickhouse-operator oci://ghcr.io/clickhouse/clickhouse-operator-helm \
--create-namespace \
-n clickhouse-operator-system
Deploy a sample cluster:
kubectl apply -f https://raw.githubusercontent.com/ClickHouse/clickhouse-operator/refs/heads/main/examples/minimal.yaml
helm install ch oci://ghcr.io/clickhouse/clickhouse-cluster-helm \
--create-namespace \
-n clickhouse
Verify the deployment:
kubectl get clickhouseclusters
kubectl get keeperclusters
kubectl get pods
Build and push your image to the location specified by IMG:
make docker-build docker-push IMAGE_REPO=<some-registry>
NOTE: This image ought to be pushed to the personal registry you specified. And it is required to have access to pull the image from the working environment. Make sure you have the proper permission to the registry if the above commands don’t work.
Install the Custom Resource Definitions(CRD) into the cluster:
make install
Deploy the Manager to the cluster with the image specified by IMG:
make deploy IMAGE_REPO=<some-registry>
NOTE: If you encounter RBAC errors, you may need to grant yourself cluster-admin privileges or be logged in as admin.
The examples/ directory contains various ClickHouse cluster configurations:
To deploy any example:
kubectl apply -f examples/<example-file>.yaml
Delete the APIs(CRDs) from the cluster:
make uninstall
UnDeploy the controller from the cluster:
make undeploy
For more detailed information, see the documentation.
We welcome contributions to the ClickHouse Operator project! Here's how you can help:
Before contributing, please ensure:
make testmake lint(top 30 of 31)
Go
93.7%
Makefile
3.6%
Go Template
1.2%