Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Stackland
  • What's new
  • Installation
    • All tutorials
    • Installing Stackland on Yandex BareMetal
    • Setting up external access to a pod in a cluster
    • 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
  • Access management
  • Pricing policy
  • Diagnostics and troubleshooting
  1. Step-by-step guides
  2. Message broker
  3. Creating a cluster

Creating a cluster Apache Kafka®

Written by
Yandex Cloud
Updated at April 8, 2026

If you have a project, you can create an Apache Kafka® cluster in it.

CLI
Management console
  1. If the project does not exist yet, create it: kubectl create namespace <project name>.

  2. Create the KafkaCluster resource file, e.g., using the touch kafkacluster.yaml command.

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

    apiVersion: kafka.stackland.yandex.cloud/v1alpha1
    kind: KafkaCluster
    metadata:
      name: cluster-omdb
      labels:
        environment: production
        tier: messaging
    spec:
      version: "4.0.0"
      controller:
        instances: 3
        storage:
          size: 1Gi
          # storageClass: "stackland-default"
      broker:
        instances: 3
        storage:
          size: 2Gi
          # storageClass: "stackland-default"
        diskAutoScaling:
          enabled: true
          maxSize: 300Gi
          minimalIncrement: 2Gi
          standardIncreasePercent: 20
          resizeTriggerPercent: 20
      listenerType: LoadBalancer # Network listener (LoadBalancer or ClusterIP)
      config: # configuration
        offsets.topic.replication.factor: 3
        transaction.state.log.replication.factor: 3
        transaction.state.log.min.isr: 2
        default.replication.factor: 3
        min.insync.replicas: 2
    
  4. Apply the manifest: kubectl apply -f kafkacluster.yaml -n <project name>. Optionally, you can specify the project name in the metadata.namespace resource property and skip it in the command.

To connect to the cluster, follow the guide on Connecting to an Apache Kafka® cluster.

  1. If you have not opened a project yet, select one.

  2. In the left-hand menu, select Kafka Clusters.

  3. Click Create.

  4. Fill out the fields as follows:

    • Cluster name: Use only lowercase letters, numbers, and hyphens.
    • Kafka version: Select it from the list of available versions.
    • Number of replicas of the message processing service.
    • Computing resources, where Limits is the upper limit and Requests is the lower limit.
    • Storage, where Disk type is the storage class (stackland-nvme, stackland-ssd, stackland-hdd, stackland-other). Learn more about storage classes in Disk subsystem. You can also enable Automatic storage expansion.
    • Number of replicas of the coordination service.
    • Computing resources, where Limits is the upper limit and Requests is the lower limit.
    • Storage, where Disk type is the storage class (stackland-nvme, stackland-ssd, stackland-hdd, stackland-other).
  5. Click Create.

To connect to the cluster, follow the guide on Connecting to an Apache Kafka® cluster.

Was the article helpful?

Previous
Deleting AccessKey
Next
Creating a topic
© 2026 Direct Cursus Technology L.L.C.