Kafka on Azure Kubernetes Service, Part 2

Agraj Mangal
The Startup
Published in
12 min readSep 15, 2020

--

Calling it Part2, but this is indeed the third post in our series of running Kafka on AKS, or any flavor of Kubernetes:

  1. Blog Post One— Running Kafka on Kubernetes
  2. Blog Post Two— Monitoring Kafka via Prometheus & Grafana.

The rationale behind calling it Part 2 is that you would only need the context & concepts of the first one, where we deployed a basic Kafka Cluster on AKS, created some Topics & Users and test the setup with Producer & Consumer CLI commands. Building on those, this blog post would focus on:

  1. Exposing the brokers outside Kubernetes Cluster securely.
  2. Exposing Prometheus Metrics & Consuming them via Azure Monitor

Like before, we do most of our Kafka related setup using the Strimzi Operator for Kafka (version 0.19 at the time of this writing) and deploy Kafka to Azure Kubernetes Service, but you can deploy to any flavor of Kubernetes. Let’s get started !

Expose Kafka outside K8s Cluster Securely

As you tend to expose the Kafka brokers outside the cluster, you must do so securely & to that end you should consider:

  • Enabling TLS encryption for data exchange
  • Authentication to provide Identity
  • Authorization to allow/decline actions to Users on Topics

All these features are supported by Strimzi Operator out of the box, and all we…

--

--

Agraj Mangal
The Startup

Engineering @ Atlassian | Ex-Adobe | Ex-Microsoft | https://agrajmangal.in/blog/ | Opinions my own