Skip to Content
Database OperationsClustering & High Availability

KalamDB Cluster Operations

Use the CLI to inspect nodes and replication groups, then perform one maintenance action at a time. Connect with a DBA or system account to an existing cluster; the commands below do not provision hosts or configure networking.

Inspect a KalamDB cluster

BASH
kalam --url http://127.0.0.1:2900 -c '\cluster list'kalam --url http://127.0.0.1:2900 -c '\cluster list groups'

For machine-readable output, query the views:

BASH
kalam --url http://127.0.0.1:2900 --json \  -c 'SELECT * FROM system.cluster ORDER BY node_id;'
SQL
SELECT * FROM system.cluster ORDER BY is_leader DESC, node_id;SELECT * FROM system.cluster_groups ORDER BY group_id;

Check reachable nodes and the leader for each group. Multi-Raft groups can have different leaders. Maintain quorum during maintenance; restarting a majority of voting members together can stop progress.

Command reference

These are CLI meta-commands, entered inside kalam or passed to kalam -c:

CommandPurposeBefore running
\cluster listShow nodesCheck node reachability
\cluster list groupsShow group leadership and replication stateIdentify the affected group
\cluster snapshotRequest snapshotsInspect success for every returned group
\cluster join <id> <rpc> <api>Add a configured nodeUse a unique node ID and reachable RPC/API addresses
\cluster rebalanceRequest leader redistributionCheck cluster health and allow work to settle
\cluster trigger-electionRequest electionsExpect leader changes and possible brief interruption
\cluster transfer-leader <node_id>Request transfer to a nodeCheck target membership; runtime support depends on the Raft implementation
\cluster stepdownAsk local leaders to step downUse during controlled maintenance
\cluster purge --upto <index>Request log purge through an indexConfirm the snapshot and recovery implications; do not guess an index
\cluster clearClean snapshot filesInspect what will be removed; do not treat this as routine health repair

Commands that touch several groups return per-group results. A successful HTTP response is not enough: inspect the success and error fields for every group.

Snapshot and inspect

BASH
kalam -c '\cluster snapshot'kalam -c '\cluster list groups'

Record the snapshot indices and failed groups, if any. A Raft snapshot is not a substitute for a complete backup and restore procedure.

Join a configured node

After configuring and starting the new node according to Clustering & High Availability, substitute its actual addresses:

BASH
kalam -c '\cluster join 4 10.0.0.4:2910 http://10.0.0.4:2900'kalam -c '\cluster list'kalam -c '\cluster list groups'

The first address is the inter-node RPC listener; the second is the HTTP API. A successful join request is not evidence that every group is caught up. Inspect membership, replication, and errors before moving traffic or stopping another node.

If redistribution is needed after the cluster is healthy:

BASH
kalam -c '\cluster rebalance'kalam -c '\cluster list groups'

Maintenance and limitations

Keep the original deployment configuration, backups, and node identities available. For a single-node deployment, cluster inspection may show standalone behavior and cluster-only operations may be unavailable.

CLUSTER LEAVE is unsupported. Use CLI list commands or system views instead of old CLUSTER LIST, STATUS, or LS SQL forms. Leader-transfer requests can return an unsupported result in some builds; inspect the response instead of assuming leadership moved.

Next step

Monitor cluster health and diagnose failures →

Reference: Multi-Raft architecture and configuration.