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
Flags
Value | Type | Description |
---|---|---|
|
string |
Output format. Possible values: |
|
- |
Help for move. |
|
stringArray |
Topic-partitions to move and new replica locations (repeatable). |
|
string |
Redpanda or |
|
stringArray |
Override |
|
string |
Profile to use. See |
|
- |
Enable verbose logging. |