| name | rpk-cluster |
| description | Operates a Redpanda cluster from the command line using the `rpk cluster` command group — the CLI front-end to the Admin API. Covers health checks, cluster metadata, broker management, cluster configuration, partition balancing and movement, maintenance mode, client quotas, log directories, transactions, self-test benchmarks, and license management. Use when: checking cluster health or metadata, listing brokers, decommissioning or recommissioning a broker (via `rpk redpanda admin brokers` — covered here because it pairs with maintenance mode), getting or setting cluster configuration properties, balancing or moving partitions, enabling or disabling maintenance mode on a node, monitoring Kafka client connections, managing client quotas, viewing log dirs, running cluster self-tests, or managing the Redpanda license from the CLI. Also use when asked about rpk cluster health, rpk cluster info, rpk cluster config get/set/edit/import/export/lint/status, rpk cluster partitions list/balance/move/move-cancel/move-status/balancer-status, rpk cluster maintenance enable/disable/status, rpk cluster connections, rpk cluster quotas alter/describe/import, rpk cluster logdirs describe, rpk cluster self-test start/stop/status, rpk cluster txn, rpk cluster license, or broker decommission (rpk redpanda admin brokers decommission/decommission-status/recommission). Also covers enabling Redpanda Enterprise differentiators through cluster config and license management: Continuous Data Balancing (partition_autobalancing_mode=continuous), Continuous Intra-Broker / core balancing (core_balancing_continuous), Tiered Storage (cloud_storage_enabled), Whole Cluster Restore and mountable topics (rpk cluster storage restore/mount/unmount), Iceberg Topics (iceberg_enabled), Shadow Linking cross-cluster DR (enable_shadow_linking), Remote Read Replicas (cloud_storage_enable_remote_read), Audit Logging (audit_enabled), Leadership Pinning (default_leaders_preference), Server-Side Schema ID Validation (enable_schema_id_validation), Schema Registry authorization, Topic Deletion Control (delete_topic_enable), and OIDC/OAUTHBEARER/Kerberos auth (sasl_mechanisms, http_authentication). |
rpk cluster: Brokers, Config, Partitions & Maintenance
rpk cluster is the CLI front-end to the Redpanda Admin API (default port
9644). It lets you inspect and operate a running Redpanda cluster without
writing raw HTTP calls. Every subcommand communicates with the Admin API unless
noted otherwise (rpk cluster info, rpk cluster logdirs, and
rpk cluster quotas use the Kafka protocol — they need the broker port
(default 9092) and Kafka/SASL credentials, not the Admin API port 9644).
The command group has these major subgroups: health, info, logdirs,
config, connections, maintenance, partitions, self-test, quotas,
storage, txn, and license. (There is no brokers subgroup —
broker decommission/recommission lives at rpk redpanda admin brokers,
covered below because it pairs with maintenance mode.)
Quickstart
rpk cluster health
rpk cluster info
rpk cluster info -b --detailed
rpk cluster config get log_retention_ms
rpk cluster config set log_retention_ms=604800000
rpk cluster config set -- log_retention_ms -1
rpk cluster config status
rpk cluster partitions list my-topic
rpk cluster partitions list --all
rpk cluster partitions balance
rpk cluster partitions balancer-status
rpk cluster partitions move my-topic -p 0:1,2,3
rpk cluster partitions move-cancel
rpk cluster maintenance enable 1 --wait
rpk cluster maintenance status
rpk redpanda admin brokers decommission 4
rpk redpanda admin brokers decommission-status 4
rpk cluster self-test start --no-confirm
rpk cluster self-test status
rpk cluster logdirs describe -H --aggregate-into topic
rpk cluster quotas alter --add producer_byte_rate=180000 --name client-id=my-producer
Cluster Health and Metadata
rpk cluster health
Queries the Admin API for a health overview. A cluster is healthy when:
- All nodes are responding
- All partitions have leaders
- The cluster controller is present
rpk cluster health
rpk cluster health --watch
rpk cluster health --exit-when-healthy
The output includes: is_healthy, unhealthy_reasons, controller_id,
all_nodes, nodes_down, nodes_in_recovery_mode,
leaderless_partitions (count), under_replicated_partitions (count), and
high_disk_usage_nodes.
Flags: -w/--watch, -e/--exit-when-healthy, --format json|yaml|text|wide.
Note: --watch and --exit-when-healthy are only available with --format text
(the default). Combining them with --format json, yaml, or wide returns
an error.
rpk cluster info
Fetches Kafka-protocol metadata (cluster name, brokers, topics). Aliases:
rpk cluster status, rpk cluster metadata.
rpk cluster info
rpk cluster info -b --detailed
rpk cluster info -b --include-decommissioned
rpk cluster info -t my-topic -d
Key flags: -b/--print-brokers, -t/--print-topics, -d/--print-detailed-topics,
-i/--print-internal-topics, --detailed, --include-decommissioned.
The BROKERS section marks the controller with *. With --detailed, adds
CORES, MEMBERSHIP, IS-ALIVE, VERSION, and UUID columns, plus a DISK SPACE
section showing free/total/used% per path per node.
rpk cluster logdirs describe
Describes log directory sizes using the Kafka protocol.
rpk cluster logdirs describe
rpk cluster logdirs describe --topics my-topic -H
rpk cluster logdirs describe --aggregate-into broker
rpk cluster logdirs describe --aggregate-into topic
rpk cluster logdirs describe -b 1
rpk cluster logdirs describe --sort-by-size
Aggregate options: partition (default), broker, dir, topic.
rpk cluster connections list
Displays statistics about active and recently closed Kafka connections in the
cluster — useful for finding which client applications are producing load.
Notably available on Redpanda Cloud too (it maps to the Data Plane monitoring
API there).
rpk cluster connections list
rpk cluster connections list --order-by="recent_request_statistics.produce_bytes desc"
rpk cluster connections list --order-by="recent_request_statistics.fetch_bytes desc"
rpk cluster connections list --order-by="idle_duration desc"
Shorthand filters (e.g. --client-id, --state) plus raw expressions
(--filter-raw, --order-by) are available — see --help for the full list;
the expression syntax follows the Admin API's ListKafkaConnections endpoint.
Brokers
Broker decommission/recommission commands live under rpk redpanda admin brokers, not rpk cluster. They are covered here because decommission is a
cluster-shrink operation that pairs with maintenance mode.
rpk redpanda admin brokers list
rpk redpanda admin brokers decommission 4
rpk redpanda admin brokers decommission-status 4
rpk redpanda admin brokers decommission-status 4 -d
rpk redpanda admin brokers decommission-status 4 -H
rpk redpanda admin brokers recommission 4
rpk redpanda admin brokers decommission 4 --force
See brokers-maintenance.md for full
decommission/recommission and maintenance-mode detail.
Cluster Configuration
Cluster properties apply to all nodes and are separate from node (redpanda.yaml)
properties. Changes propagate immediately.
rpk cluster config get log_retention_ms
rpk cluster config set log_retention_ms=604800000
rpk cluster config set iceberg_enabled=true iceberg_catalog_type=rest
rpk cluster config edit
rpk cluster config list
rpk cluster config list --filter="kafka.*"
rpk cluster config export -f /tmp/cluster-config.yml
rpk cluster config import -f /tmp/cluster-config.yml
rpk cluster config lint -f /tmp/cluster-config.yml
rpk cluster config status
rpk cluster config force-reset log_retention_ms
See config.md for property categories, common keys,
and the cluster-vs-node config distinction.
Partitions
rpk cluster partitions list my-topic other-topic
rpk cluster partitions list --all
rpk cluster partitions list my-topic --partition 0,1,2
rpk cluster partitions list my-topic --node-ids 2
rpk cluster partitions list --all --disabled-only
rpk cluster partitions balance
rpk cluster partitions balancer-status
rpk cluster partitions move my-topic -p 0:1,2,3
rpk cluster partitions move my-topic -p 0:1-0,2-0,3-0
rpk cluster partitions move -p foo/0:1,2,3
rpk cluster partitions move-cancel
rpk cluster partitions move-cancel --node 1
rpk cluster partitions move-status
rpk cluster partitions transfer-leadership my-topic --partition 0:2
rpk cluster partitions transfer-leadership --partition my-topic/0:2
rpk cluster partitions enable my-topic --partitions 0
rpk cluster partitions disable my-topic --partitions 0
rpk cluster partitions disable my-topic --all
rpk cluster partitions unsafe-recover --from-nodes 2,3
rpk cluster partitions unsafe-recover --from-nodes 2,3 --dry
See partitions.md for balancer states, move
syntax, and safe move workflows.
Maintenance Mode
Maintenance mode drains raft leadership off a node so it can be safely
restarted or upgraded with minimal disruption. Only one node may be in
maintenance mode at a time.
rpk cluster maintenance enable 1
rpk cluster maintenance enable 1 --wait
rpk cluster maintenance disable 1
rpk cluster maintenance status
Status table columns: NODE-ID, ENABLED, FINISHED, ERRORS, PARTITIONS,
ELIGIBLE, TRANSFERRING, FAILED.
See brokers-maintenance.md for the
rolling-upgrade playbook.
Self-Test
Benchmarks disk I/O and network throughput on cluster nodes using the Admin
API. Do not run on a production cluster under heavy load.
rpk cluster self-test start
rpk cluster self-test start --no-confirm
rpk cluster self-test start --only-disk-test
rpk cluster self-test start --only-network-test
rpk cluster self-test start --only-cloud-test
rpk cluster self-test start --participant-node-ids 1,2
rpk cluster self-test status
rpk cluster self-test stop
Default durations: disk 30 s, network 30 s. Disk test suite includes 512 KB
sequential r/w throughput, 4 KB latency at varying io depths, and 16 KB tests.
Network test is an 8 KB throughput test between all node pairs.
See health-and-selftest.md for test
descriptions and interpreting results.
Quotas
Client quotas throttle produce and consume byte rates for Kafka clients,
matched by client ID or client ID prefix.
rpk cluster quotas alter --add consumer_byte_rate=200000 --name client-id=my-consumer
rpk cluster quotas alter --add producer_byte_rate=180000 --name client-id-prefix=batch-
rpk cluster quotas alter --add producer_byte_rate=180000 --default client-id
rpk cluster quotas alter --delete producer_byte_rate --name client-id=my-consumer
rpk cluster quotas alter --add consumer_byte_rate=200000 --name client-id=foo --dry
rpk cluster quotas describe
rpk cluster quotas import --from /tmp/quotas.yml
Storage (Whole Cluster Restore & Mountable Topics)
rpk cluster storage interacts with Tiered Storage at the cluster level: it
recovers topics/cluster state from the object-storage (archival) bucket and
mounts/unmounts topics between the cluster and Tiered Storage. Both Whole
Cluster Restore and mountable topics are Enterprise-licensed capabilities
and require Tiered Storage (cloud_storage_enabled=true).
rpk cluster storage restore start
rpk cluster storage restore start --wait
rpk cluster storage restore status
rpk cluster storage list-mountable
rpk cluster storage mount my-namespace/my-topic
rpk cluster storage mount my-namespace/my-topic --to my-namespace/my-new-topic
rpk cluster storage unmount my-namespace/my-topic
rpk cluster storage list-mount
rpk cluster storage status-mount 123
rpk cluster storage cancel-mount 123
See storage.md for the restore workflow, mount/unmount
lifecycle, and migration states.
Enterprise Features
Most Redpanda differentiators are gated behind an Enterprise license and
turned on through cluster config (rpk cluster config set). New clusters
(24.3+) ship with a 30-day trial; on expiration, enabling/modifying these
features is restricted (the cluster keeps running without data loss).
rpk cluster license info
rpk cluster license set --path /etc/redpanda/redpanda.license
rpk cluster config set partition_autobalancing_mode continuous
rpk cluster config set core_balancing_continuous true
rpk cluster config set cloud_storage_enabled true
rpk cluster config set iceberg_enabled true
rpk cluster config set enable_shadow_linking true
rpk cluster config set audit_enabled true
rpk cluster config set enable_schema_id_validation redpanda
rpk cluster config set default_leaders_preference racks:rack1,rack2
rpk cluster config set delete_topic_enable false
rpk cluster config set sasl_mechanisms "[SCRAM,GSSAPI,OAUTHBEARER]"
rpk cluster config set http_authentication "[BASIC,OIDC]"
The 14 enterprise-flagged cluster properties, their nested sub-settings
(partition_autobalancing_*, iceberg_*, audit_*, cloud_storage_*), the
license-free fallback values, and disablement-for-compliance steps are
documented in enterprise-features.md.
RBAC/GBAC is managed via rpk security role, and FIPS via
rpk redpanda config set redpanda.fips_mode (both noted in that reference).
Reference Directory
- enterprise-features.md: Enterprise differentiators via cluster config +
rpk cluster license — the 14 enterprise-flagged cluster properties with defaults/enterprise values, plus nested settings for Continuous Data Balancing, core balancing, Tiered Storage, Iceberg Topics, Shadow Linking, Remote Read Replicas, Audit Logging, Leadership Pinning, Schema ID Validation, Schema Registry authorization, Topic Deletion Control, and OIDC/OAUTHBEARER/Kerberos auth. Also notes Cloud Topics (cluster prerequisite cloud_topics_enabled, a non-enterprise deprecated property; per-topic redpanda.storage.mode=cloud). License lifecycle and compliance-disable steps.
- config.md:
rpk cluster config subcommands in depth — get/set/edit/list/import/export/lint/force-reset/status, common property keys, and the cluster-vs-node config distinction.
- storage.md:
rpk cluster storage subcommands — Whole Cluster Restore / topic recovery (restore start/restore status) and mountable topics (mount/unmount/list-mountable/list-mount/status-mount/cancel-mount), both Enterprise-licensed and Tiered-Storage-backed.
- partitions.md:
rpk cluster partitions subcommands — list, balance, balancer-status, move (format syntax), move-cancel, move-status, enable/disable, and unsafe-recover.
- brokers-maintenance.md: broker decommission/recommission/decommission-status (via
rpk redpanda admin brokers) and rpk cluster maintenance (enable/disable/status) — lifecycle, rolling upgrade playbook, and interaction with replication.
- health-and-selftest.md:
rpk cluster health, rpk cluster info, rpk cluster logdirs describe, rpk cluster quotas, and rpk cluster self-test — health fields, metadata sections, log-dir aggregation, quota types, and self-test benchmarks.