psorbit-node01
- 172.21.0.90
psorbit-node02
- 172.21.0.91
psorbit-node03
- 172.21.0.92
rpk
(Redpanda CLI) for managing and monitoring the cluster.Update the configuration file (/etc/redpanda/redpanda.yaml
) on psorbit-node01
with the following:
empty_seed_starts_cluster: true
seed_servers: []
Allow all ports to communicate between the redpanda nodes
sudo ufw allow 9092/tcp
sudo ufw allow 8082/tcp
sudo ufw allow 8081/tcp
sudo ufw allow 9644/tcp
sudo ufw allow 33145/tcp
sudo ufw reload
Start Redpanda on the bootstrap node:
systemctl start redpanda
Verify the cluster status:
rpk cluster info
For each additional node (e.g., psorbit-node02
, psorbit-node03
, etc.), update the configuration file (/etc/redpanda/redpanda.yaml
) with the cluster details:
empty_seed_starts_cluster: false
seed_servers:
- host:
address: psorbit-node01
port: 33145
- host:
address: psorbit-node02
port: 33145
- host:
address: psorbit-node03
port: 33145
Start Redpanda on each joining node:
systemctl start redpanda
Check the cluster status on each node to ensure they have joined:
rpk cluster info
After all nodes are configured and started, verify the cluster:
rpk cluster info
to monitor the cluster:
rpk cluster info
*
in the output).Example output:
CLUSTER
=======
redpanda.73a1a280-1cbf-4b10-85a0-4c2b790a5934
BROKERS
=======
ID HOST PORT
0 psorbit-node03 9092
1* psorbit-node01 9092
2 psorbit-node02 9092
TOPICS
======
NAME PARTITIONS REPLICAS
__consumer_offsets 3 3
ps_orbit_analytics 1 1
ps_orbit_asio_consumer 1 1
ps_orbit_bulkdata 1 1
ps_orbit_cachedependencyremove 1 1
ps_orbit_govtscheme 1 1
ps_orbit_invoice 1 1
ps_orbit_notify_email 1 1
ps_orbit_notify_sms 1 1
ps_orbit_notify_whatsapp 1 1
ps_orbit_paymentstatus 1 1
ps_orbit_reportgenerate 1 1
Once all nodes are joined, update the redpanda.yaml
file on the bootstrap node to include the seed servers:
Restart the Redpanda service:
systemctl restart redpanda
rpk cluster info
rpk cluster health
To delete logs and manage disk space:
sudo journalctl -xeu redpanda --vacuum-files=1
Redpanda uses the Raft Consensus Algorithm for leader election. If a leader fails, the remaining brokers will elect a new leader.