blog by OSO

Apache Kafka on Azure: Set Up Confluent Kafka Without Hesitation

Sion Smith
Sion Smith 2 September 2022
OSO article card for setting up Apache Kafka on Azure with Confluent, white title text on a navy panel and a lime Blogs label.

Updated November 2026: We have restyled this September 2022 guide. Our Terraform module is now version 2, which deploys Confluent Platform on AKS with Confluent for Kubernetes in KRaft mode instead of virtual machine scale sets, so we have updated the resource list. We also use the current product names (Confluent Platform, Microsoft Entra ID), added a comparison of Kafka options on Azure and replaced retired links.

Apache Kafka is a distributed streaming platform for handling large streams of data. It has become popular for event streaming because it offers high throughput, scalability and reliability. In this guide to Apache Kafka on Azure we cover:

  • How to set up Apache Kafka on Azure with Confluent
  • Best practices for your Kafka architecture
  • What a production-ready configuration includes

We also point you to the Terraform module you can use to make the process automated and repeatable.

Why run Apache Kafka on Azure?

There are many reasons to run Apache Kafka on the Azure cloud. Here are some of the key benefits:

  1. Flexibility and control over your data
  2. Scalability and performance on demand for Kafka deployments
  3. Integration with other Azure services: Confluent offers connectors for services such as Azure Event Hubs, Azure Cosmos DB and Azure Blob Storage

Should you use fully managed or self-hosted Kafka on Azure?

apache kafka on azure - data in the cloud

Managed services such as Confluent Cloud are ideal for businesses or startups with smaller IT teams that might not have the time or resources to maintain an evolving platform. As Kafka adoption grows inside your organisation, so do your requirements for operating, maintaining and keeping clusters healthy. With a managed service you pay a subscription and the provider’s experts deploy, scale, log and monitor the infrastructure that hosts your Kafka. If you need data sovereignty, custom configuration or guaranteed high performance, you will want to host your own, and this deployment guide is a good place to start your self-hosted stream processing journey.

OptionWhat it isBest for
Confluent Cloud on AzureFully managed Kafka from Confluent, running in Azure regionsSmall platform teams that want no cluster operations
Azure Event HubsAzure’s event streaming service with a Kafka-compatible endpointSimple Kafka client workloads already on Azure
Confluent Platform on AzureSelf-managed Confluent Kafka, for example on AKSData sovereignty, custom configuration and full control

For a wider comparison of managed providers, see our guide to the best managed Kafka services.

What companies use Kafka?

Many companies use Kafka, including Uber, Netflix, Pinterest and LinkedIn. For a longer list of companies that use Kafka, see the Apache Kafka Powered By page.

Now that we have covered why you might want to run an event-driven platform, let’s walk through what this Kafka deployment guide provides.

Who is this Kafka on Azure guide for?

This deployment guide covers deploying Confluent Platform (formerly Confluent Enterprise) on Azure. It is aimed at cloud architects, administrators and DevOps professionals who are planning to implement or extend their Kafka workloads on Azure with high uptime. Confluent Platform is self-managed and licensed by Confluent. This approach simplifies deployment of your streaming infrastructure and applications, making it easy to configure, deploy, monitor and manage Confluent clusters. Confluent builds on Kafka with additional tooling to speed up developer productivity, improve real-time data management and broaden the range of applications that can benefit from the Kafka API.

Kafka clusters on Azure can support tens to thousands of traditional producer and consumer workloads, as well as Kafka Connect pipelines and Kafka clients. This is an alternative to the Azure Marketplace offerings, with recommended best practices for running a highly available production environment alongside other Azure services.

How did OSO set up Confluent Kafka on Azure?

Our recommended way to set up Confluent Apache Kafka on Azure is with the OSO Terraform module for Confluent Platform on Azure. It automates provisioning and managing your production-ready Kafka brokers, Confluent Schema Registry, Kafka Connect, ksqlDB, Confluent Control Center and the Kafka REST Proxy.

If you are not familiar with Terraform, it is a tool that lets you define infrastructure as code. You provision and manage your infrastructure with code rather than by hand in the Azure portal.

containers in the cloud

Version 2 of the module deploys Confluent Platform on Azure Kubernetes Service with the Confluent for Kubernetes operator and creates the following:

  • A resource group for all the resources in your Kafka deployment
  • A virtual network with subnets for the AKS nodes, an internal load balancer and private endpoints
  • A NAT gateway and private DNS zones
  • Azure Key Vault for secrets
  • A private AKS cluster with a system node pool and a Confluent node pool spread across 3 availability zones
  • 3 KRaft controllers and 3 or more Kafka brokers (no ZooKeeper)
  • Schema Registry and Control Center, with optional Kafka Connect, ksqlDB and REST Proxy
  • TLS/mTLS, RBAC and Azure managed identities for security
  • Prometheus ServiceMonitors and Grafana dashboards for monitoring

The original version 1 of the module deployed Kafka brokers on virtual machine scale sets with separate data disks; the repository includes a migration guide from v1 to v2. Terraform authenticates to Azure through Microsoft Entra ID (formerly Azure Active Directory), for example with a service principal that has a role assignment granting it permission to create these resources.

ComponentVersion 2 of the module
ComputePrivate AKS cluster across 3 availability zones
Kafka3+ brokers managed by Confluent for Kubernetes
Metadata3 KRaft controllers, no ZooKeeper
SecurityTLS/mTLS, RBAC, Azure managed identities, Key Vault
MonitoringPrometheus and Grafana

What is OSO’s relationship with Confluent?

OSO is a Preferred Consulting partner with Confluent, which gives us access to Kafka internal resources as well as proof of concept funding. We have the people and knowledge to provide distinct and differentiated value for the event-driven architectures our customers want to explore.

If you would like to learn more about Confluent, Apache Kafka on Azure or any of our other services, please reach out to us. We would be happy to discuss how we can help you achieve your business goals.

Where can you read more?

The white paper download for this guide has been retired; the Terraform module above is the current, maintained version of the set-up. For more reading:

Key takeaway: Choose Confluent Cloud on Azure if you want no cluster operations; choose self-managed Confluent Platform on AKS, automated with Terraform and Confluent for Kubernetes, when you need data sovereignty, custom configuration or full control.

Frequently asked questions

Can you run Apache Kafka on Azure?

Yes. You can use Confluent Cloud on Azure as a fully managed service, connect Kafka clients to the Kafka-compatible endpoint of Azure Event Hubs, or run self-managed Kafka such as Confluent Platform on Azure Kubernetes Service or virtual machines.

What is the easiest way to set up Confluent Kafka on Azure?

The easiest option is fully managed Confluent Cloud on Azure. For a self-managed cluster, OSO’s open-source Terraform module deploys Confluent Platform on AKS with Confluent for Kubernetes, so the set-up is automated and repeatable.

Is Azure Event Hubs the same as Apache Kafka?

No. Azure Event Hubs is Microsoft’s own event streaming service. It offers a Kafka-compatible endpoint, so many Kafka clients can connect to it, but it is not Apache Kafka and does not provide the full Kafka and Confluent ecosystem.

Should you use managed or self-hosted Kafka on Azure?

Managed Kafka suits smaller teams that do not want to operate clusters. Self-hosted Kafka suits organisations that need data sovereignty, custom configuration or guaranteed performance, and have the skills, or a partner, to run it.

Does the OSO Terraform module still need ZooKeeper?

No. Version 2 of the module runs Confluent Platform in KRaft mode with 3 KRaft controllers, so there is no ZooKeeper dependency.

Run Kafka on Azure with OSO

Talk to OSO's Kafka engineers about deploying and running production-ready Confluent Kafka on Azure.

CONTACT US