rpk registry mode set
Set the mode Schema Registry runs in.
Running this command with no subject sets the global mode for Schema Registry. Alternatively, use the --global flag to set the global mode for Schema Registry at the same time as per-subject modes.
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, so you must hard-delete any existing schemas before enabling IMPORT mode. To override this emptiness check, use the --force flag.
Examples
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
| Replace the placeholder values with your own values. |
Flags
| Value | Type | Description |
|---|---|---|
|
- |
Forces the setting mode to IMPORT when there are existing schemas. |
|
- |
Set the global schema registry mode in addition to subject modes. |
|
- |
Help for set. |
|
string |
Schema registry mode to set. Acceptable values: |
|
string |
Output format: |
|
string |
Redpanda or |
|
stringArray |
Override |
|
string |
Profile to use. See |
|
- |
Enable verbose logging. |