Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • 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
    • Installing Stackland on Yandex BareMetal via PXE
    • Installing Stackland on Yandex Cloud VMs
    • 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
    • Scaling a cluster
  • Access management
  • Pricing policy
  • Diagnostics and troubleshooting
  1. Step-by-step guides
  2. Message broker
  3. Creating a cluster

Creating a Apache Kafka® cluster

Written by
Yandex Cloud
Updated at June 24, 2026
View in Markdown

If you have ../projects/create-project.md, 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, or 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.