Skip to content

Distributed system for processing IoT captor data using Kubernetes, Kafka and Elastic Cloud.

Notifications You must be signed in to change notification settings

salaheddine-zemmouri/kafka-distributed-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kafka-distributed-system

Introduction

This project is an implementation of a distributed system for processing IoT captor data using Kubernetes, Kafka and Elastic Cloud.

Target Architecture

project architecture

Tutorial

Deploy Strimzi Kafka Operator

kubectl create namespace kafka

kubectl create -f 'https://strimzi.io/install/latest?namespace=kafka' -n kafka

Deploy Kafka broker and Zookeper

kubectl apply -f kafka-base/kafka-persistent.yaml -n kafka

Deploy Kafka Bridge

kubectl apply -f kafka-base/kafka-bridge -n kafka

Ingress Controller

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.5.1/deploy/static/provider/cloud/deploy.yaml

Nginx and Ingress

kubectl get svc --all-namespaces

Next you should lookup for the CLUSTER-IP of the kafka-bridge service and paste it the conf file on nginx upstream.

kubectl create configmap nginx-config --from-file=ingress/nginx.conf -n kafka

kubectl apply -f ingress/nginx.yaml -kafka

kubectl apply -f ingress/ingress-bridge.yaml -n kafka

kubectl get ingress -n kafka

You can now see the public IP that you can use to interact with your kafka cluster.

To test, use curl:

curl -v <INGRESS_IP>/healthy

You should get a status response of 200.

Kafka Connect

Deploy ElasticSearch

kubectl create -f https://download.elastic.co/downloads/eck/2.5.0/crds.yaml

kubectl apply -f https://download.elastic.co/downloads/eck/2.5.0/operator.yaml -n elastic-system

kubectl create namespace elastic

kubectl create -f elastic/elasticsearch.yaml -n elastic

Useful ressources:

https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-eck.html https://strimzi.io/blog/2020/05/07/camel-kafka-connectors/ https://strimzi.io/blog/2019/11/05/exposing-http-bridge/

About

Distributed system for processing IoT captor data using Kubernetes, Kafka and Elastic Cloud.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages