Docs Self-Managed Reference rpk Commands rpk registry rpk registry schema rpk registry schema create rpk registry schema create Create a schema for the given subject. This uploads a schema to the registry, creating the schema if it does not exist. The schema type is detected by the filename extension: .avro or .avsc for Avro, json for JSON, and .proto for Protobuf. You can manually specify the type with the --type flag. You may pass the references using the --reference flag, which accepts either a comma separated list of <name>:<subject>:<version> or a path to a file. The file must contain lines of name, subject, and version separated by a tab or space, or the equivalent in json / yaml format. Examples Create a Protobuf schema with subject foo: rpk registry schema create foo --schema path/to/file.proto Create an avro schema, passing the type via flags: rpk registry schema create foo --schema /path/to/file --type avro Create a Protobuf schema that references the schema in subject my_subject, version 1: rpk registry schema create foo --schema /path/to/file.proto --references my_name:my_subject:1 Usage rpk registry schema create SUBJECT --schema {filename} [flags] Flags Value Type Description -h, --help - Help for create. --references string Comma-separated list of references (name:subject:version) or path to reference file. --schema string Schema filepath to upload, must be .avro, .avsc, or .proto. --type string Schema type avro or protobuf ; overrides schema file extension. --config string Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD, and /etc/redpanda/redpanda.yaml. -X, --config-opt stringArray Override rpk configuration settings. See rpk -X or execute rpk -X help for inline detail or rpk -X list for terser detail. --format string Output format: json,yaml,text,wide,help. Default: text. --profile string Profile to use. See rpk profile for more details. -v, --verbose - Enable verbose logging. Back to top × Simple online edits For simple changes, such as fixing a typo, you can edit the content directly on GitHub. Edit on GitHub Or, open an issue to let us know about something that you want us to change. Open an issue Contribution guide For extensive content updates, or if you prefer to work locally, read our contribution guide . Was this helpful? thumb_up thumb_down group Ask in the community mail Share your feedback group_add Make a contribution rpk registry schema check-compatibility rpk registry schema delete