Do you need a quick way to get show some basic actions in Kafka?
-
Deploy Kafka on PDS.
-
clone this repo.
git clone https://github.com/2vcps/py-kafka.git
-
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. -
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
- Expose or connect to the UI
kubectl expose pod kafka-ui --type [LoadBalancer|NodePort]
or
kubectl port-forward pod/kafka-ui 8080:8080
- Optional, Scale the deployments for fun.
kubectl scale deployment producer-kafka --replicas 8
- Edit the
env-secret.yaml
using the px-delivery demo Kafka information. - Deploy in this order
kubectl apply -f env-secret.yaml
kubectl apply -f kafka-ui.yaml
kubectl apply -f order_producer.yaml
- Random orders are pushed into Kafka
- 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