Docs Self-Managed Reference rpk Commands rpk topic rpk topic create This is documentation for Self-Managed v23.2, which is no longer supported. To view the latest available version of the docs, see v24.2. rpk topic create Create topics. All topics created with this command will have the same number of partitions, replication factor, and key/value configs. For example, rpk topic create -c cleanup.policy=compact -r 3 -p 20 foo bar This example command creates two topics, foo and bar, each with 20 partitions, 3 replicas, and the cleanup.policy=compact config option set. Usage rpk topic create [TOPICS...] [flags] Flags Value Type Description -d, --dry - Dry run: validate the topic creation request; do not create topics. -h, --help - Help for create. -p, --partitions int32 Number of partitions to create per topic; -1 defaults to the cluster’s default_topic_partitions (default -1). -r, --replicas int16 Replication factor (must be odd); -1 defaults to the cluster’s default_topic_replications (default -1). -c, --topic-config stringArray key=value; Config parameters (repeatable; e.g. -c cleanup.policy=compact). --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; '-X help' for detail or '-X list' for terser detail. --profile string rpk profile to use. -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 topic consume rpk topic delete