rpk cluster partitions

Manage cluster partitions.

Usage

rpk cluster partitions [flags]

Subcommands

Command Description

rpk cluster partitions balance

Trigger on-demand partition balancing to redistribute partitions evenly across brokers. Redpanda automatically balances partitions when it detects imbalance; run this command to trigger balancing manually.

rpk cluster partitions balancer-status

Queries cluster for partition balancer status: If continuous partition balancing is enabled, Redpanda will continuously reassign partitions from both unavailable nodes and from nodes using more disk space than the configured limit. Use this command to monitor the partition balancer status and the partition distribution across brokers in the cluster.

rpk cluster partitions disable

Disable partitions of a topic You may disable all partitions of a topic using the --all flag or you may select a set of topic/partitions to disable with the --partitions/-p flag. The partition flag accepts the format {namespace}/{topic}/[partitions…​] where namespace and topic are optional parameters.

rpk cluster partitions enable

Enable partitions of a topic You may enable all partitions of a topic using the --all flag or you may select a set of topic/partitions to enable with the --partitions/-p flag. The partition flag accepts the format {namespace}/{topic}/[partitions…​] where namespace and topic are optional parameters.

rpk cluster partitions list

List partitions in the cluster. This command lists the cluster-level metadata of all partitions, including current replica assignments on brokers and CPU cores for given topics.

rpk cluster partitions move

Move partition replicas across nodes / cores. This command changes replica assignments for given partitions.

rpk cluster partitions move-cancel

Cancel ongoing partition movements. By default, this command cancels all the partition movements in the cluster.

rpk cluster partitions move-status

Show ongoing partition movements. By default this command lists all ongoing partition movements in the cluster.

rpk cluster partitions transfer-leadership

Transfer partition leadership between brokers. This command allows you to transfer partition leadership.

rpk cluster partitions unsafe-recover

Recover unsafely from partitions that have lost majority. This command allows you to unsafely recover all data adversely affected by the loss of the nodes specified in the --from-nodes flag.

Global flags

Value Type Description

--config

string

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

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.