0% found this document useful (0 votes)
47 views2 pages

Kafka Cluster

This document provides commands to deploy Apache Kafka on OpenShift using Strimzi. It creates a Kafka cluster with 3 brokers and 3 Zookeeper nodes using ephemeral storage. It then creates a topic with 3 partitions and 3 replicas. Finally it applies the Strimzi operator and examples to the namespace and waits for the Kafka cluster to be ready.

Uploaded by

maxkyc sq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views2 pages

Kafka Cluster

This document provides commands to deploy Apache Kafka on OpenShift using Strimzi. It creates a Kafka cluster with 3 brokers and 3 Zookeeper nodes using ephemeral storage. It then creates a topic with 3 partitions and 3 replicas. Finally it applies the Strimzi operator and examples to the namespace and waits for the Kafka cluster to be ready.

Uploaded by

maxkyc sq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

- https://strimzi.

io/quickstarts/
- https://developers.redhat.com/blog/2018/10/29/how-to-run-kafka-on-openshift-the-
enterprise-kubernetes-with-amq-streams/

$ cat << EOF | oc create -f -


apiVersion: kafka.strimzi.io/v1alpha1
kind: Kafka
metadata:
name: my-cluster
spec:
kafka:
  replicas: 3
  listeners:
    external:
      type: route
  storage:
    type: ephemeral
zookeeper:
  replicas: 3
  storage:
    type: ephemeral
entityOperator:
  topicOperator: {}
EOF

## ——————————————————————————

$ cat << EOF | oc create -f -


apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaTopic
metadata:
name: my-topic
labels:
  strimzi.io/cluster: “my-cluster"
spec:
partitions: 3
replicas: 3
EOF
oc apply -f 'https://strimzi.io/install/latest?
namespace=maxis-logger' -n maxis-logger

oc apply -f https://strimzi.io/examples/
latest/kafka/kafka-persistent-
single.yaml -n maxis-logger

oc wait kafka/my-cluster --
for=condition=Ready --timeout=300s -n
maxis-logger

You might also like