KubeBlocks
BlogsEnterprise
⌘K
​
Blogs

Overview
Quickstart
Architecture

Operations

Stop / Start / Restart
Vertical Scaling
Horizontal Scaling
Volume Expansion
Reconfigure
Switchover
Manage Services

Observability

Prometheus Integration
  1. Prerequisites
  2. Stop the Cluster
  3. Start the Cluster
  4. Restart a Component
  5. Cleanup

Stop, Start, and Restart a ClickHouse Cluster

Prerequisites

    • A functional Kubernetes cluster (v1.21+ recommended)
    • kubectl v1.21+ installed and configured with cluster access
    • KubeBlocks installed (installation guide)
    • ClickHouse Add-on enabled
    • A demo namespace: kubectl create ns demo

    Stop the Cluster

    Stopping a cluster suspends all pods while retaining PVCs and data. Useful for saving compute costs during idle periods.

    kubectl apply -f - <<EOF apiVersion: operations.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: clickhouse-stop namespace: demo spec: clusterName: clickhouse-cluster type: Stop EOF

    Monitor progress:

    kubectl get cluster clickhouse-cluster -n demo -w
    Example Output
    NAME CLUSTER-DEFINITION TERMINATION-POLICY STATUS AGE clickhouse-cluster clickhouse Delete Stopping 10s clickhouse-cluster clickhouse Delete Stopped 45s

    Start the Cluster

    kubectl apply -f - <<EOF apiVersion: operations.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: clickhouse-start namespace: demo spec: clusterName: clickhouse-cluster type: Start EOF
    Example Output
    NAME CLUSTER-DEFINITION TERMINATION-POLICY STATUS AGE clickhouse-cluster clickhouse Delete Running 2m

    Restart a Component

    Restart the ClickHouse shard component:

    kubectl apply -f - <<EOF apiVersion: operations.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: clickhouse-restart namespace: demo spec: clusterName: clickhouse-cluster type: Restart restart: - componentName: clickhouse EOF

    For clusters with Keeper, restart the Keeper component:

    kubectl apply -f - <<EOF apiVersion: operations.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: clickhouse-restart-keeper namespace: demo spec: clusterName: clickhouse-cluster type: Restart restart: - componentName: ch-keeper EOF

    Monitor the OpsRequest:

    kubectl get opsrequest -n demo -w
    Example Output
    NAME TYPE CLUSTER STATUS PROGRESS AGE clickhouse-restart Restart clickhouse-cluster Succeed 1/1 30s

    Cleanup

    kubectl delete opsrequest clickhouse-stop clickhouse-start clickhouse-restart clickhouse-restart-keeper -n demo --ignore-not-found

    © 2026 KUBEBLOCKS INC