2vcps / py-kafka

Python Container to Demo Kafka in Portworx Data Services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to Demo Kafka in PDS

Do you need a quick way to get show some basic actions in Kafka?

  1. Deploy Kafka on PDS.

  2. clone this repo.

git clone https://github.com/2vcps/py-kafka.git
  1. Edit the env-secret.yaml with your connection servername, username and password from your PDS deployment. Also change the topic name if you would like.

  2. Deploy to k8s in this order.

kubectl apply -f env-secret.yaml
kubectl apply -f init_topic.yaml
kubectl apply -f producer.yaml
kubectl apply -f consumer.yaml
kubectl apply -f kafka-ui.yaml
  1. Expose or connect to the UI
kubectl expose pod kafka-ui --type [LoadBalancer|NodePort]

or

kubectl port-forward pod/kafka-ui 8080:8080
  1. Optional, Scale the deployments for fun.
kubectl scale deployment producer-kafka --replicas 8

Using Order Producer

  1. Edit the env-secret.yaml using the px-delivery demo Kafka information.
  2. Deploy in this order
kubectl apply -f env-secret.yaml
kubectl apply -f kafka-ui.yaml
kubectl apply -f order_producer.yaml
  1. Random orders are pushed into Kafka
  2. Expose or connect to the UI and check the "Order" topic
kubectl expose pod kafka-ui --type [LoadBalancer|NodePort]

or

kubectl port-forward pod/kafka-ui 8080:8080

About

Python Container to Demo Kafka in Portworx Data Services


Languages

Language:Python 94.3%Language:Dockerfile 5.7%