# 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-operator-version: v26.1.4
# EOL = End-of-Life (support lifecycle status)
page-is-nearing-eol: "false"
page-is-past-eol: "true"
page-eol-date: April 30, 2025
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
docname: rpk/rpk-cluster/rpk-cluster-partitions-transfer-leadership
page-component-name: streaming
page-version: "24.1"
page-component-version: "24.1"
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/v/24.1/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-partitions-transfer-leadership.adoc
page-git-created-date: "2024-05-30"
page-git-modified-date: "2024-06-12"
support-status: past end-of-life
---

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

Transfer partition leadership between brokers.

You can transfer only one partition leader at a time.

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

Transfer partition leadership:

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

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.

Equivalent command using different syntax:

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

## [](#flags)Flags

| Value | Type | Description |
| --- | --- | --- |
| --format | string | Output format. Possible values: json, yaml, text, wide, help. Default: text. |
| -h, --help | - | Help for transfer-leadership. |
| -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. |
| --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. |
| -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. |