You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/reference/pages/rpk/rpk-cluster/rpk-cluster-partitions-transfer-leadership.adoc
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
1
= rpk cluster partitions transfer-leadership
2
2
3
-
Transfer partition leadership between brokers.
3
+
Transfer partition leadership between brokers. This command supports transferring only one partition leader at a time.
4
4
5
-
You can transfer only one partition leader at a time.
6
-
7
-
WARNING: Redpanda tries to balance leadership distribution across brokers by default. If the distribution of leaders becomes uneven as a result of transferring leadership across brokers, the cluster may move leadership back to the original brokers automatically.
5
+
NOTE: Redpanda tries to balance leadership distribution across brokers by default.
6
+
If the distribution of leaders becomes uneven as a result of transferring leadership
7
+
across brokers, the cluster may move leadership back to the original
The preceding example shows how to transfer leadership for the partition `kafka/foo/0` to broker 2. By default, it uses the `kafka` namespace, but you can specify an internal namespace using the `+{namespace}/+` prefix.
25
-
26
-
Equivalent command using different syntax:
25
+
The `--partition` flag accepts a value `<A>:<B>`, where `A` is a topic-partition and `B` is the ID of the broker to which you want to transfer leadership. To specify a topic-partition, you can use just the partition ID (`0`) or also use the topic name together with the partition using the following syntax:
In this case, the name of the topic is `test-topic` and the partition ID is `0`.
32
+
33
+
The preceding examples transfer leadership for the partition `kafka/test-topic/0`. The command behavior is based on the assumption that the default namespace is `kafka`, but you can also specify an internal namespace using the `+{namespace}/+` prefix.
|-p, --partition |string |The topic partition to which to transfer leadership and specify the new leader location. Syntax `-p A:B` where A is the partition leader and B will be the new leader. See <<examples>> for how to use it.
45
+
|-p, --partition |string |Specify the topic-partition's leadership to transfer and the location of the new leader. Use the syntax `-p <topic-partition>:<new-leader-broker-ID>`.
43
46
44
47
|--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`.
0 commit comments