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. Scale the NameServer
  3. Scale the Broker
  4. Cleanup

Vertical Scaling for RocketMQ

Vertical scaling adjusts the CPU and memory allocated to a component's pods. KubeBlocks performs a rolling restart to apply the new resource limits.

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)

    Scale the NameServer

    kubectl apply -f - <<EOF apiVersion: operations.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: rocketmq-verticalscale-namesrv namespace: demo spec: clusterName: rocketmq-cluster type: VerticalScaling verticalScaling: - componentName: namesrv requests: cpu: "1" memory: "1Gi" limits: cpu: "1" memory: "1Gi" EOF

    Scale the Broker

    Use the sharding group name broker in the OpsRequest:

    kubectl apply -f - <<EOF apiVersion: operations.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: name: rocketmq-verticalscale-broker namespace: demo spec: clusterName: rocketmq-cluster type: VerticalScaling verticalScaling: - componentName: broker requests: cpu: "1" memory: "2Gi" limits: cpu: "1" memory: "2Gi" EOF

    Monitor progress:

    kubectl get opsrequest rocketmq-verticalscale-namesrv -n demo -w
    Example Output
    NAME TYPE CLUSTER STATUS PROGRESS AGE rocketmq-verticalscale-namesrv VerticalScaling rocketmq-cluster Succeed 1/1 45s

    Verify the new resource allocation on the NameServer pod:

    kubectl get pod rocketmq-cluster-namesrv-0 -n demo \ -o jsonpath='{.spec.containers[0].resources}' | python3 -m json.tool

    Cleanup

    kubectl delete opsrequest rocketmq-verticalscale-namesrv rocketmq-verticalscale-broker -n demo --ignore-not-found

    © 2026 KUBEBLOCKS INC