# rpk cluster partitions transfer-leadership

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [streaming-full.txt](https://docs.redpanda.com/streaming-full.txt)

---
title: rpk cluster partitions transfer-leadership
latest-redpanda-tag: v26.2.1
latest-console-tag: v3.10.0
latest-operator-version: v26.2.1
# EOL = End-of-Life (support lifecycle status)
page-is-nearing-eol: "false"
page-is-past-eol: "false"
page-eol-date: July 28, 2027
latest-connect-version: 4.105.0
docname: rpk/rpk-cluster/rpk-cluster-partitions-transfer-leadership
page-component-name: streaming
page-version: "26.2"
page-component-version: "26.2"
page-component-title: Streaming
page-relative-src-path: rpk/rpk-cluster/rpk-cluster-partitions-transfer-leadership.adoc
page-edit-url: https://github.com/redpanda-data/docs/edit/main/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-partitions-transfer-leadership.adoc
description: Transfer partition leadership between brokers. This command allows you to transfer partition leadership.
page-git-created-date: "2024-05-30"
page-git-modified-date: "2026-08-01"
support-status: supported
---

<!-- Source: https://docs.redpanda.com/streaming/current/reference/rpk/rpk-cluster/rpk-cluster-partitions-transfer-leadership.md -->

Transfer partition leadership between brokers.

This command allows you to transfer partition leadership. You can transfer only one partition leader at a time.

To transfer partition leadership, use the following syntax: `rpk cluster partitions transfer-leadership foo --partition 0:2`.

Here, the command transfers leadership for the partition `kafka/foo/0` to broker 2. By default, it assumes the `kafka` namespace, but you can specify an internal namespace using the `{namespace}/` prefix.

Here is an equivalent command using different syntax: `rpk cluster partitions transfer-leadership --partition foo/0:2`.

> ⚠️ **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.

## [](#usage)Usage

```bash
rpk cluster partitions transfer-leadership [flags]
```

## [](#examples)Examples

This section provides examples of how to use `rpk cluster partitions transfer-leadership`.

To transfer partition leadership for a partition `0` to a broker ID `2`, run.

```bash
rpk cluster partitions transfer-leadership foo --partition 0:2
```

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.

```bash
rpk cluster partitions transfer-leadership --partition test-topic/0:2
```

## [](#flags)Flags

| Value | Type | Description |
| --- | --- | --- |
| --format | string | Output format (json,yaml,text,wide,help). |
| -p, --partition | string | Topic-partition and target leader in the format <partition>:<broker-id>, for example 0:2 or test-topic/0:2. Use the <namespace>/ prefix for internal namespaces. |

## [](#global-flags)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. |