rpk cluster partitions list
List partitions in the cluster.
This commands lists the cluster-level metadata of all partitions in the cluster.
It shows the current replica assignments on both brokers and CPU cores for given topics. By default, it assumes the kafka
namespace, but you can specify an internal namespace using the <namespace>/
prefix.
The Replica-Core
column displayed in the output table contains a list of replica assignments in the form of <node-id>-<core>.
If the Disabled column contains a '-' value, then it means you are running this command against a cluster that does not support the underlying API.
Enabled/Disabled
Disabling a partition in Redpanda involves prohibiting any data consumption or production to and from it. All internal processes associated with the partition are stopped, and it remains unloaded during system startup. This measure aims to maintain cluster health by preventing issues caused by specific corrupted partitions that may lead to Redpanda crashes. Although the data remains stored on disk, Redpanda ceases interaction with the disabled partitions to ensure system stability. You may disable/enable partition using rpk cluster partitions enable/disable
.
Flags
Value | Type | Description |
---|---|---|
|
- |
If true, list all partitions in the cluster. |
|
- |
If true, list disabled partitions only. |
|
string |
Output format. Possible values: |
|
- |
Help for list. |
|
ints |
List of comma-separated broker IDs you wish to use to filter the results. |
|
ints |
List of comma-separated partitions IDs you wish to use to filter the results. |
|
string |
Redpanda or |
|
stringArray |
Override |
|
string |
Profile to use. See |
|
- |
Enable verbose logging. |
Examples
List all partitions in the cluster:
rpk cluster partitions list --all
List all partitions in the cluster, filtering for topic foo and bar:
rpk cluster partitions list foo bar
List partitions with replicas that are assigned to brokers 1 and 2.
rpk cluster partitions list foo --node-ids 1,2
List only the disabled partitions:
rpk cluster partitions list -a --disabled-only
List all in JSON format:
rpk cluster partition list -a --format json