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
will create two topics, foo
and bar
, each with 20 partitions, 3 replicas, and the cleanup.policy=compact
config option set.
Flags
Value | Type | Description |
---|---|---|
|
- |
Dry run: validate the topic creation request; do not create topics. |
|
- |
Help for create. |
|
int32 |
Number of partitions to create per topic; -1 defaults to the cluster’s default_topic_partitions (default -1). |
|
int16 |
Replication factor (must be odd); -1 defaults to the cluster’s default_topic_replications (default -1). |
|
stringArray |
key=value; Config parameters
(repeatable; for example |
|
strings |
Comma-separated list of broker <ip>:<port> pairs
(for example,
` --brokers '192.168.78.34:9092,192.168.78.35:9092,192.179.23.54:9092' `
). Alternatively, you may set the |
|
string |
Redpanda config file, if not set the file will be searched for in the default locations. |
|
string |
SASL password to be used for authentication. |
|
string |
The authentication mechanism to use.
Supported values: |
|
string |
The certificate to be used for TLS authentication with the broker. |
|
- |
Enable TLS for the Kafka API (not necessary if specifying custom certs). |
|
string |
The certificate key to be used for TLS authentication with the broker. |
|
string |
The truststore to be used for TLS communication with the broker. |
|
string |
SASL user to be used for authentication. |
|
- |
Enable verbose logging (default |