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.
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/ lsCreate 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/ lsReplace 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' *.xmlEdit the broker property files (e.g., broker-a.properties) to set the cluster and broker names:
brokerClusterName=rocketmq-cluster brokerName=broker-aStart 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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
