KubeBlocks
BlogsEnterprise
⌘K
​
Blogs

Overview
Quickstart
Architecture

Operations

Stop / Start / Restart
Vertical Scaling
Horizontal Scaling
Volume Expansion
Reconfigure
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 RocketMQ Cluster

Prerequisites

    Before proceeding, verify your environment meets these requirements:

    • A functional Kubernetes cluster (v1.21+ recommended)
    • kubectl v1.21+ installed and configured with cluster access
    • Helm installed (installation guide)
    • KubeBlocks installed (installation guide)
    • RocketMQ Add-on installed and a RocketMQ cluster running (see Quickstart)

    Stop the Cluster

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

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

    Monitor progress:

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

    All pods are terminated while PVCs remain intact.

    Start the Cluster

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

    Restart a Component

    You can restart individual components without affecting the others. For example, restart the NameServer:

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

    To restart the broker, use the sharding group name broker:

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

    Monitor the OpsRequest:

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

    Cleanup

    kubectl delete opsrequest rocketmq-stop rocketmq-start rocketmq-restart-namesrv -n demo --ignore-not-found

    © 2026 KUBEBLOCKS INC