Operations 4 min read

Step-by-Step Deployment of RocketMQ 4.8 on a Kubernetes Master Node

This guide walks through downloading, extracting, configuring, and starting RocketMQ 4.8 on a Kubernetes master, covering directory setup, configuration edits, and verification of the NameServer and Broker processes to complete a production‑ready message‑queue deployment.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Step-by-Step Deployment of RocketMQ 4.8 on a Kubernetes Master Node

RocketMQ is a distributed, queue‑model message middleware that guarantees strict message order, offers rich pull modes, supports efficient horizontal scaling of subscribers, provides real‑time subscription, and can handle billions of queued messages.

First, download the RocketMQ binary package and unzip it: unzip rocketmq-all-4.8.0-bin-release.zip The archive creates the rocketmq-all-4.8.0-bin-release/ directory with subfolders such as benchmark, bin, conf, and lib.

Move the extracted directory to the installation path and inspect its contents:

mv rocketmq-all-4.8.0-bin-release /usr/local/rocketmq
cd /usr/local/rocketmq/
ls

Create a log directory for RocketMQ: mkdir -p /usr/local/rocketmq/logs/rocketmqlogs Enter the configuration directory and list available files:

cd /usr/local/rocketmq/conf/
ls

Replace the placeholder ${user.home} with the actual installation path in all XML configuration files:

cd /usr/local/rocketmq/conf && sed -i 's#${user.home}#/usr/local/rocketmq#g' *.xml

Edit the broker property files (e.g., broker-a.properties) to set the cluster and broker names:

brokerClusterName=rocketmq-cluster
brokerName=broker-a

Start the NameServer in the background and note its PID: nohup ./mqnamesrv & Verify that the NameServer is running: jps Start the Broker using the previously edited property file, also in the background:

nohup sh mqbroker -c /usr/local/rocketmq/conf/2m-2s-sync/broker-a.properties &

Check that both NameServer and Broker processes are active: jps When the processes NamesrvStartup and BrokerStartup appear in the jps output, the RocketMQ deployment is complete.

Deployment completed successfully.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DeploymentMessage QueueRocketMQ
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.