Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Stackland
  • What's new
  • Installation
    • All tutorials
    • Installing Stackland on Yandex BareMetal
    • Installing Stackland on Yandex BareMetal via PXE
    • Installing Stackland on Yandex Cloud VMs
    • Setting up external access to a pod in a cluster
    • Verifying signatures for custom images
    • All guides
      • Creating a cluster
      • Creating a topic
      • Creating a user
      • Connecting to a cluster
      • Deleting a cluster
      • Deleting a topic
      • Deleting a user
    • Projects
    • Resource model
    • Scaling a cluster
    • Licensing
  • Access management
  • Pricing policy
  • Diagnostics and troubleshooting
  1. Step-by-step guides
  2. Message broker
  3. Creating a topic

Creating a topic

Written by
Yandex Cloud
Updated at April 8, 2026
View in Markdown

If you have created a cluster, you can create a topic in it.

CLI
Management console
  1. Create a file of the KafkaTopic resource, e.g., using the touch kafkatopic.yaml command.

  2. Open the file and paste the configuration below into it:

    apiVersion: kafka.stackland.yandex.cloud/v1alpha1
    kind: KafkaTopic
    metadata:
      name: kafka-topic-with-config
      labels:
        kafka-cluster: cluster-omdb
    spec:
      topicName: with-config
      partitions: 3
      replicas: 3
      config:
        retention.ms: 604800000
        segment.bytes: 1073741824
    
  3. Apply the manifest: kubectl apply -f kafkatopic.yaml -n <project name>. Optionally, you can specify the project name in the metadata.namespace resource property and skip it in the command.

  1. If you have not opened a project yet, select one.
  2. In the left-hand menu, select Kafka Clusters.
  3. Select a cluster.
  4. Go to the Topics tab.
  5. Click Create topic.
  6. Enter the topic name and click Create.

Was the article helpful?

Previous
Creating a cluster
Next
Creating a user
© 2026 Direct Cursus Technology L.L.C.