This is a Kubernetes and Cloud Foundry service broker for provisioning and granting access to Kafka topics on Confluent Cloud, or for a dedicated Kafka Cluster. It is written according to the Open Service Broker API: https://www.openservicebrokerapi.org .
It does not provision Kafka clusters itself.
The service broker grants access to a central multi-tenant cluster and provides the following functionality:
For integration testing a local Zookeeper server and Kafka broker are started.
mvn clean test
.docker-compose up
. src/main/resources/application.properties
. mvn spring-boot:run
See the kubernetes
subdirectory for installation Kubernetes. This has been tested with Google Kubernetes Service.
The steps are as follows:
src/main/resources/application-ccloud.yaml
to src/main/resources/<your-name>.yaml
and adjust the credentials for accessing Confluent Cloud.mvn clean package
cp target/kafka-service-broker-1.0-SNAPSHOT.jar kubernetes/
kubernetes/Dockerfile
and set the environment variable SPRING_PROFILES_ACTIVE to <your-name>
cd kubernetes
; docker build .
build.sh
script for this. catalog
exists. Deploy the service-broker kubectl apply -f service-broker.yaml
.install-service-catalog.sh
kubectl apply -f service-broker-service.yaml
kubectl apply -f service-broker-registration.yaml
ccloud
cli. Post these service accounts to the service broker, such that it can supply them to client applications for accessing the topics. See the script post-accounts.sh
for details. kubectl apply -f service-instance.yaml
kubectl apply -f service-binding.yaml
. This will create the kubernetes secret object that can be referenced from your Confluent Cloud client application. cf push -f manifest.yml
.cf create-service-broker kafka-broker <user> <password> http://kafka-service-broker.dev.cfdev.sh
cf enable-service-access confluent-kafka
ccloud
cli. Post these service accounts to the service broker, such that it can supply them to client applications for accessing the topics. See the script post-accounts.sh
for details. cf create-service confluent-kafka gold my-topic -c '{ "topic_name" : "gold-topic" }'
cf bind-service kafka-service-broker my-topic -c '{ "consumer_group" : "consumer_group_1" }'