| name | rpk-cluster |
| description | Operate a Redpanda cluster's health, brokers, configuration, and maintenance from the CLI using the `rpk cluster` command group, the front-end to the Admin API. Use when checking cluster health or metadata, decommissioning or recommissioning brokers, getting or setting cluster config properties, balancing or moving partitions, enabling maintenance mode, managing client quotas, running self-tests, or managing the Enterprise license. Also covers enabling Enterprise differentiators through cluster config: Continuous Data Balancing, Tiered Storage, and Iceberg Topics. It also manages Shadow Linking DR, Remote Read Replicas, Audit Logging, and Leadership Pinning. For single-node process lifecycle (start/stop, tuning, redpanda.yaml), see /redpanda:rpk-redpanda; for diagnostics bundles, see /redpanda:rpk-debug. |
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,
brokers, config, connections, loggers, maintenance, partitions,
self-test, quotas, storage, txn, upgrade, and license.
brokers, loggers, and upgrade were added in Redpanda v26.2. Broker
decommission/recommission now lives at rpk cluster brokers; the older
rpk redpanda admin brokers commands still work but are hidden and deprecated
(they forward to rpk cluster brokers).
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 cluster brokers decommission 4
rpk cluster 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
rpk cluster brokers manages broker membership through the Admin API:
decommission, decommission-status, and recommission (added in v26.2).
There is no rpk cluster brokers list — list brokers with
rpk cluster info -b --detailed. The older rpk redpanda admin brokers
commands still work but are hidden and deprecated, forwarding here.
rpk cluster info -b --detailed
rpk cluster brokers decommission 4
rpk cluster brokers decommission-status 4
rpk cluster brokers decommission-status 4 -d
rpk cluster brokers decommission-status 4 -H
rpk cluster brokers recommission 4
rpk cluster brokers decommission 4 --skip-liveness-check
--skip-liveness-check is the canonical bypass flag; the older --force
spelling is now a hidden, deprecated alias for it.
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.
Broker Log Levels (rpk cluster loggers)
Temporarily raise or lower a broker's per-logger log level through the Admin
API — the standard way to capture debug/trace logs without a restart, and
without the risk of leaving debug logging on permanently (overrides expire).
Added in v26.2; it replaces the now-deprecated
rpk redpanda admin config log-level.
rpk cluster loggers list
rpk cluster loggers list --node-id 1
rpk cluster loggers set storage --node-id 1
rpk cluster loggers set raft rpc --node-id 1 -l trace -e 60
rpk cluster loggers set all --node-id 1 -l debug -e 120
--node-id is required for set (it targets one broker). Flags:
-l/--level (error|warn|info|debug|trace, default debug),
-e/--expiry-seconds (default 300; 0 persists until shutdown). Unknown
logger names are accepted (per-logger success/failure is printed), so rpk and
redpanda can be upgraded independently. The logger set is broker-version
specific — always discover it with rpk cluster loggers list.
Cluster Upgrade Finalization (rpk cluster upgrade)
Redpanda gates new features behind a logical cluster version that advances
only once every broker reports the new binary version. Normally this
finalization is automatic. When the cluster config features_auto_finalization
is false, finalization is deferred so you can soak-test on the new version
and still downgrade; rpk cluster upgrade (added in v26.2) inspects and
completes that deferred step through the Admin API.
rpk cluster upgrade status
rpk cluster upgrade finalize
rpk cluster upgrade finalize --no-confirm
finalize is irreversible — once finalized you can no longer downgrade to
the previous version. It only runs when the cluster is ready to finalize (all
brokers on the same new version and live) and refuses when
features_auto_finalization is enabled (the cluster finalizes on its own then).
status reports the lifecycle state (finalized, ready to finalize, or
upgrade in progress).
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 cluster brokers; the legacy rpk redpanda admin brokers path is hidden/deprecated) 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.