Cloud

rpk registry mode set

Set schema registry mode.

Running this command with no subject sets the global schema registry mode, alternatively you can use the --global flag to set the global schema registry mode at the same time as per-subject mode.

Acceptable mode values:

  • READONLY

  • READWRITE

  • IMPORT

You can only enable IMPORT mode on an empty schema registry (if setting mode globally) or an empty subject (if setting at the subject level). Empty means no schemas have ever been registered. Soft deletions are not sufficient — you must hard-delete any existing schemas before enabling IMPORT mode. To override this emptiness check, use the --force flag.

Usage

rpk registry mode set <subject...> [flags]

Examples

This section provides examples of how to use rpk registry mode set.

Set the global schema registry mode to READONLY.

rpk registry mode set --mode READONLY

Set the schema registry mode to READWRITE in subjects <subject-1> and <subject-2>.

rpk registry mode set <subject-1> <subject-2> --mode READWRITE

Set the schema registry mode to IMPORT, overriding the emptiness check.

rpk registry mode set --mode IMPORT --global --force

Flags

Value Type Description

--force

bool

Whether to force setting mode to IMPORT when there are existing schemas.

--global

bool

Set the global schema registry mode in addition to subject modes.

--mode

string

Schema registry mode to set. Supported values: READONLY, READWRITE, IMPORT (case insensitive).

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.