---
title: rpk topic
latest-redpanda-tag: v26.2.7
latest-console-tag: v3.14.0
latest-operator-version: v26.2.6
# EOL = End-of-Life (support lifecycle status)
page-is-nearing-eol: "false"
page-is-past-eol: "false"
page-eol-date: July 28, 2027
latest-connect-version: 4.118.0
docname: rpk/rpk-topic/rpk-topic
page-component-name: streaming
page-version: "26.2"
page-component-version: "26.2"
page-component-title: Streaming
page-relative-src-path: rpk/rpk-topic/rpk-topic.adoc
page-edit-url: https://github.com/redpanda-data/docs/edit/main/modules/reference/pages/rpk/rpk-topic/rpk-topic.adoc
description: Manage Kafka topics, including creating, deleting, and configuring topics. Also includes commands for producing and consuming messages.
page-git-created-date: "2023-05-17"
page-git-modified-date: "2026-10-31"
page-autogenerated: true
page-generated-by: doc-tools (rpk-docs)
page-generated-from: the rpk command help in redpanda-data/streaming-enterprise
page-generated-content: all
support-status: supported
---

# rpk topic

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [streaming-full.txt](https://docs.redpanda.com/streaming-full.txt)

<!-- Source: https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic.md -->

Manage Kafka topics, including creating, deleting, and configuring topics. Also includes commands for producing and consuming messages.

## Usage

```bash
rpk topic [flags]
```

## Subcommands

| Command | Description |
| --- | --- |
| [`rpk topic add-partitions`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-add-partitions/) | Add partitions to existing topics. |
| [`rpk topic alter-config`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-alter-config/) | Set, delete, add, and remove key/value configs for a topic. This command allows you to incrementally alter the configuration for multiple topics at a time. |
| [`rpk topic analyze`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-analyze/) | Analyze topics. This command consumes records from the specified topics to determine topic characteristics such as batch rate and batch size. |
| [`rpk topic consume`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-consume/) | Consume records from topics. Consuming records reads from any amount of input topics, formats each record according to `--format`, and prints them to `STDOUT`. |
| [`rpk topic create`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-create/) | Create one or more Kafka topics with configurable partitions, replication factor, and topic-level settings. All topics created with one invocation have the same number of partitions, replication factor, and key/value configs. |
| [`rpk topic delete`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-delete/) | Delete one or more Kafka topics. This command deletes all requested topics, printing the success or fail status per topic. |
| [`rpk topic describe`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-describe/) | Print detailed information about topics. There are three potential views: a summary of the topic, the topic configurations, and a detailed partitions section. |
| [`rpk topic describe-storage`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-describe-storage/) | Describe the topic storage status. This command prints detailed information about the cloud storage status of a topic. |
| [`rpk topic list`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-list/) | List topics, optionally listing specific topics. This command lists all topics that you have access to by default. |
| [`rpk topic produce`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-produce/) | Produce records to a topic. Producing records reads from `STDIN`, parses input according to `--format`, and produces records to Redpanda. |
| [`rpk topic trim-prefix`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-trim-prefix/) | Trim records from topics. This command allows you to trim records from topics, to trim the topics Redpanda sets the LogStartOffset for partitions to the requested offset. |

## Global flags

| Value | Type | Description |
| --- | --- | --- |
| `--config` | string | Redpanda or `rpk` config file; default search paths are `~/.config/rpk/rpk.yaml`, `$PWD/redpanda.yaml`, and `/etc/redpanda/redpanda.yaml`. |
| `-X, --config-opt` | stringArray | Override `rpk` configuration settings; `-X help` for detail or `-X list` for terser detail. |
| `--ignore-profile` | bool | Ignore `rpk.yaml` and `redpanda.yaml`; use default settings. |
| `--profile` | string | `rpk` profile to use. |
| `-v, --verbose` | bool | Enable verbose logging. |

## Suggested reading

-   [Create a topic](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-create/)

-   [Produce records to a topic](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-produce/)

-   [List topics](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-list/)

-   [Consume records from a topic](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-consume/)

-   [Delete a topic](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-delete/)

-   [Describe a topic and its configuration](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-describe/)

-   [Describe the storage status of a topic](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-describe-storage/)

-   [Modify topic configuration](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-alter-config/)

-   [Trim existing records in a topic](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-trim-prefix/)

-   [Add partitions to an existing topic](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-topic/rpk-topic-add-partitions/)