Skip to content

Instantly share code, notes, and snippets.

@tombentley
Forked from matzew/Quickstart_OKD.md
Created October 22, 2018 09:06
Show Gist options
  • Save tombentley/f6f5fd3cc97cafc225d112e2bd60a4a3 to your computer and use it in GitHub Desktop.
Save tombentley/f6f5fd3cc97cafc225d112e2bd60a4a3 to your computer and use it in GitHub Desktop.

Strimzi Quickstart

Getting up and running with a Apache Kafka cluster on Kubernetes and OKD can be very simple, when using the Strimzi project! This quick start guide walks you through a quick and easy install for your development environment, using OKD.

Start OKD

This assumes that you have the latest version of the oc binary, which you can get here.

oc cluster up

This will start a local installation of OKD. Once this is completed, login as a cluster-admin user:

# Install as cluster-admin
oc login -u system:admin

# Setup Strimzi
oc project myproject

Next we are applying the Strimzi install files, including ClusterRoles, ClusterRoleBindings and some Custom Resource Definitions (CRDs) for the Apache Kafka itself, or creating Apache Kafka topics:

oc apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.8.1/strimzi-cluster-operator-0.8.1.yaml -n myproject

Next, we feed Strimzi with a simple Custom Resource, which will than give you a simple, ephemeral Apache Kafka Cluster:

# Apply the `Kafka` Cluster CR file, with exposed IP
oc apply -f https://gist.githubusercontent.com/matzew/a57485deff91591a442dcf6c7ab16c87/raw/4c90042c8b7151b614b8a81ccb1a76955046348c/strimzi.yaml -n myproject

We can now watch the deployment, and see all required pods being created:

watch oc get pods -n myproject

Now, we need to lookup the EXTERNAL-IP which will be used connecting your application to Apache Kafka:

oc get service -n myproject -l strimzi.io/name=my-cluster-kafka-external-bootstrap

Enjoy your Apache Kafka cluster, running on OKD!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment