rpk cluster partitions balance

Triggers on-demand partition balancing.

With Redpanda Community Edition, the partition count on each broker can easily become uneven, which leads to data skewing. To distribute partitions across brokers, you can run this command to trigger on-demand partition balancing.

With Redpanda Enterprise Edition, Continuous Data Balancing monitors broker and rack availability, as well as disk usage, to avoid topic hotspots. However, there are edge cases where users should manually trigger partition balancing (such as a node becoming unavailable for a prolonged time and rejoining the cluster thereafter). In such cases, you should run this command to trigger partition balancing manually.

After you run this command, monitor the balancer progress using:

rpk cluster partitions balancer-status

To see more detailed movement status, monitor the progress using:

rpk cluster partitions move-status

Usage

rpk cluster partitions balance [flags]

Flags

Value Type Description

-h, --help

-

Help for balance.

--config

string

Redpanda or rpk config file; default search paths are /var/lib/redpanda/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings. See rpk -X or execute rpk -X help for inline detail or rpk -X list for terser detail.

--profile

string

Profile to use. See rpk profile for more details.

-v, --verbose

-

Enable verbose logging.