rpk cluster partitions move

Move partition replicas across nodes / 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.

Usage

rpk cluster partitions move [flags]

Examples

This section provides examples of how to use rpk cluster partitions move.

Basic replica movement

Move partition 0 to brokers 1,2,3 and partition 1 to brokers 2,3,4 for topic foo

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

Specifying cores

Move replicas to specific cores on brokers

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

Multi-topic movement

Move partitions across different topics and namespaces

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

Flags

Value Type Description

--format

string

Output format (json,yaml,text,wide,help).

-p, --partition

stringArray

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

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.