rpk cluster partitions move

Move partition replicas across brokers/cores.

This command changes replica assignments for given partitions. By default, it assumes the kafka namespace, but you can specify an internal namespace using the <namespace>/ prefix.

Examples

To move replicas, use the following syntax:

rpk cluster partitions move foo --partition 0:1,2,3 -p 1:2,3,4

Here, the command assigns new replicas for partition 0 to brokers [1, 2, 3] and for partition 1 to brokers [2, 3, 4] for the topic foo.

You can also specify the core id with --<core_id> where the new replicas should be placed:

rpk cluster partitions move foo -p 0:1-0,2-0,3-0

Here all new replicas [1, 2, 3] will be assigned on core 0 on the brokers. The command does not change a core assignment unless it is explicitly specified. When a core is not specified for a new broker, the command randomly picks a core and assigns a replica to the core.

Topic arguments are optional. For more control, you can specify the topic name in the --partition flag:

rpk cluster partitions move -p foo/0:1,2,3 -p kafka_internal/tx/0:1-0,2-0,3-0

Usage

rpk cluster partitions move [flags]

Flags

Value Type Description

--format

string

Output format. Possible values: json, yaml, text, wide, help. Default: text.

-h, --help

-

Help for move.

-p, --partition

stringArray

Topic-partitions to move and new replica locations (repeatable).

--config

string

Redpanda or rpk config file. Default search paths are: ~/.config/rpk/rpk.yaml, $PWD, 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.