Apache Kafka examples
All examples require:
- A Kubernetes cluster with
- Knative Eventing v0.9+
- An Apache Kafka cluster
If you want to run the Apache Kafka cluster on Kubernetes, the simplest option is to install it by using Strimzi.
Install the Strimzi operator, like:
curl -L "https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.16.2/strimzi-cluster-operator-0.16.2.yaml" \
| sed 's/namespace: .*/namespace: kafka/' \
| kubectl -n kafka apply -f -
-
This will install a small, non-production, cluster of Apache Kafka. To verify your installation, check if the pods for Strimzi are all up, in the kafka
namespace:
Installation script
$ ./kafka_setup.sh
Examples of Apache Kafka and Knative
A number of different examples, showing the KafkaSource
, KafkaChannel
and can be found here: