rpk topic create

An rpk command that creates one or more topics, optionally setting the partition count, replication factor and topic properties.

In more detail

The -p flag sets partitions, -r sets the replication factor and -c sets a topic property such as cleanup.policy=compact. The command prints OK for each topic it creates.

Examples

rpk topic create m07l02-events -p 3 -r 3
rpk topic create prices -c cleanup.policy=compact

Related terms

Taught in

References