Posts

Showing posts with the label Kafka

Kafka Message system on Kubernetes

Image
  Setting up the Kubernetes namespace for kafka apiVersion: v1 kind: Namespace metadata: name: "kafka" labels: name: "kafka" k apply -f kafka-ns.yml Now let's create the ZooKeeper container inside the kafka namespace apiVersion: v1 kind: Service metadata: labels: app: zookeeper-service name: zookeeper-service namespace: kafka spec: type: NodePort ports: - name: zookeeper-port port: 2181 nodePort: 30181 targetPort: 2181 selector: app: zookeeper --- apiVersion: apps/v1 kind: Deployment metadata: labels: app: zookeeper name: zookeeper namespace: kafka spec: replicas: 1 selector: matchLabels: app: zookeeper template: metadata: labels: app: zookeeper spec: containers: - image: wurstmeister/zookeeper imagePullPolicy: IfNotPresent name: zookeeper ports: - containerPort: 2181 image1 - kube-kafka1 From th...

Kafdrop install and Monitor

Image
There are many monitoring trools available for Kafka brokers. Ive collectiect Various monitoring options: Factor House Kpow Datadog Logit.io Kafka Lag Exporter Confluent CMAK (Cluster Manager for Apache Kafka) Kafdrop Offset Explorer  Let's explore the kafdrop monitoring Prerequisites: To run the Kafdrop monitoring tool Ensure Java installed by checking java -version If you don't find java on your Ubuntu run the following : sudo apt update sudo apt install openjdk-21-jdk -y for other Linux distributions you need to use right package manger to install JDK. Download Kafdrop jar file from github : sudo mkdir kafka-monitor cd kafka-monitor curl -L -o kafdrop.jar https://github.com/obsidiandynamics/kafdrop/releases/download/4.1.0/kafdrop-4.1.0.jar The curl command ensures that Kafdrop may have any release version but the jar file renamed as `kafdrop.jar`. Now all set to go and run the Kafdrop jar file with the --kafka.brokerConnect option where you can give sing...

Kafka installation on Ubuntu

Image
Apache Kafka is one of the most widely adopted distributed event-streaming platforms used by organizations to process, store, and analyze real-time data at scale. Originally developed at LinkedIn and later open-sourced through the Apache Software Foundation, Kafka was designed to handle massive volumes of real-time data generated by millions of users worldwide. In this hands-on tutorial, you will learn how to install Apache Kafka on Ubuntu, configure multiple Kafka brokers on a single host, create topics, publish messages, and consume messages using Kafka command-line tools. What You'll Learn By the end of this tutorial, you will be able to: Understand Kafka architecture and messaging concepts Install Apache Kafka on Ubuntu Linux Configure ZooKeeper for Kafka Create a multi-broker Kafka cluster Create and manage Kafka topics Publish messages using Kafka Producers Read messages using Kafka Consumers Verify Kafka services and network ports What is Apache Kafka? Apache Kafka is a dist...