kubectl
access to a Kubernetes cluster.- Credentials for an IBM Event Streams instance that has the following permissions:
- to create topics required by the Kafka Connect configuration (see
connect-distributed.properties
) - to read/write to the topics accessed by the Connectors
- to create topics required by the Kafka Connect configuration (see
Edit connect-distributed.properties
replacing the <BOOTSTRAP_SERVERS>
and <APIKEY>
placeholders with your Event Streams credentials.
Create the following Kubernetes resources:
kubectl create secret generic connect-distributed-config --from-file=connect-distributed.properties
kubectl create configmap connect-log4j-config --from-file=connect-log4j.properties
Deploy the event-streams-samples/eventstreams-kafka-connect
Docker image:
kubectl apply -f ./kafka-connect.yaml
Note that the sample yaml file specifies a single replica. Edit the replicas
field if you want to run multiple Connect workers.
Also, note that affinity rules might be needed to spread the workers across nodes.
To manage connectors, port forward to the kafkaconnect-service
Service on port 8083:
kubectl port-forward service/kafkaconnect-service 8083
The Connect REST API is then available via http://localhost:8083
.
The Connect REST API is documented at https://kafka.apache.org/documentation/#connect_rest
When the Kafka Connect runtime is running, see the instructions for running the connectors: