rpk redpanda mode

Enable a default configuration mode.

This command allows you to set one of the following modes: Development, Production, or Recovery.

This command is only available on Linux.

Usage

rpk redpanda mode <mode> [flags]

Mode details

Development mode

Development mode (development or dev) includes the following development-only settings:

  • Sets developer_mode to true. This starts Redpanda with dev-mode only settings, including:

    • No minimal memory limits are enforced.

    • No core assignment rules for Redpanda brokers are enforced.

    • Enables write caching, which is a relaxed mode of acks=all that acknowledges a message as soon as it is received and acknowledged on a majority of brokers, without waiting for it to fsync to disk. This provides lower latency while still ensuring that a majority of brokers acknowledge the write. For more information, or to disable this, see write caching.

    • Bypasses fsync (from Seastar option unsafe_bypass_fsync), which results in unrealistically fast clusters and may result in data loss.

  • Sets overprovisioned to true. Redpanda expects a dev system to be an overprovisioned environment. Based on a Seastar option, setting overprovisioned disables thread affinity, zeros idle polling time, and disables busy-poll for disk I/O.

  • Sets all autotuner tuners to false. The tuners are intended to run only for production mode.

  • Turns on protected mode while the protected_mode cluster property is unset. Admin API, Kafka, Schema Registry, and HTTP Proxy listeners without authentication or mTLS accept only loopback clients. Clusters created with Redpanda 26.2 or earlier keep protected mode off unless protected_mode is set explicitly.

Production mode

Production mode (production or prod) disables dev-mode settings:

  • developer_mode: false

  • overprovisioned: false

While the protected_mode cluster property is unset, production mode leaves protected mode off after you restart the broker, so listeners without authentication accept remote clients. Switching to production mode doesn’t add authentication. Before you serve remote clients, configure authentication or mTLS on each listener.

It also enables a set of tuners of the autotuner. For descriptions about the tuners, see Tuners in the rpk redpanda tune list command reference.

Recovery mode

Recovery mode (recovery) sets the broker configuration property recovery_mode_enabled to true. This provides a stable environment for troubleshooting and restoring a failed cluster.

Production

  • Enforces optimal runtime checks.

  • Enables all rpk tuners, for you to run rpk redpanda tune.

  • Leaves protected_mode off while that cluster property is unset, so listeners without authentication accept remote clients.

Development

  • Disables optimal checks and bypasses fsync, which results in unrealistically fast clusters and may result in data loss.

  • Disables all rpk tuners. The tuners are intended to run only for production mode.

  • Turns protected_mode on while that cluster property is unset: Admin API, Kafka, Schema Registry and HTTP Proxy listeners without authentication or mTLS accept only loopback clients. Clusters created with Redpanda 26.2 or earlier keep it off unless it is set explicitly. To serve remote clients, run rpk cluster config set protected_mode false on the broker host, or switch to production mode and restart.

Recovery

Sets the broker configuration property 'redpanda.recovery_mode_enabled=true' in your redpanda.yaml. This provides a stable environment for troubleshooting and restoring a failed cluster. Restart required.

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.