← 返回命令列表

Linux command

rpk 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create topic

rpk topic create [topic-name]

List topics

rpk topic list

Produce message

rpk topic produce [topic] -k [key]

Consume messages

rpk topic consume [topic]

Describe cluster

rpk cluster info

Check configuration

rpk redpanda config

说明

rpk is the command-line interface for Redpanda, a Kafka-compatible streaming data platform. It provides commands for managing topics, producing and consuming messages, administering clusters, and configuring Redpanda nodes, using a syntax familiar to users of Kafka's CLI tools. Topic operations include creating, deleting, describing, and listing topics, as well as producing messages to and consuming messages from topics for testing and debugging. Cluster commands provide health checks, configuration inspection, and broker management. The tool also handles ACL (Access Control List) management and consumer group operations. The -X flag passes client properties like authentication credentials and TLS settings, and --brokers specifies the cluster endpoints to connect to.

参数

topic
Topic operations.
cluster
Cluster commands.
redpanda
Redpanda management.
acl
ACL management.
group
Consumer groups.
-X _PROP=VAL_
Client property.
--brokers _HOSTS_
Broker addresses.

FAQ

What is the rpk command used for?

rpk is the command-line interface for Redpanda, a Kafka-compatible streaming data platform. It provides commands for managing topics, producing and consuming messages, administering clusters, and configuring Redpanda nodes, using a syntax familiar to users of Kafka's CLI tools. Topic operations include creating, deleting, describing, and listing topics, as well as producing messages to and consuming messages from topics for testing and debugging. Cluster commands provide health checks, configuration inspection, and broker management. The tool also handles ACL (Access Control List) management and consumer group operations. The -X flag passes client properties like authentication credentials and TLS settings, and --brokers specifies the cluster endpoints to connect to.

How do I run a basic rpk example?

Run `rpk topic create [topic-name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does topic do in rpk?

Topic operations.