Skip to content

Instantly share code, notes, and snippets.

@jkeam
Created August 22, 2022 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkeam/0d8bf950b25972b304cfc9b3dff76125 to your computer and use it in GitHub Desktop.
Save jkeam/0d8bf950b25972b304cfc9b3dff76125 to your computer and use it in GitHub Desktop.
AMQ Streams create Kafka
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: my-cluster
labels:
app: my-app
namespace: openshift-operators
spec:
kafka:
config:
offsets.topic.replication.factor: 3
transaction.state.log.replication.factor: 3
transaction.state.log.min.isr: 2
default.replication.factor: 3
min.insync.replicas: 2
inter.broker.protocol.version: '3.1'
storage:
type: ephemeral
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
version: 3.1.0
replicas: 3
entityOperator:
topicOperator: {}
userOperator: {}
zookeeper:
storage:
type: ephemeral
replicas: 3
@jkeam
Copy link
Author

jkeam commented Aug 22, 2022

Default, simple, and ephemeral Kafka cluster using AMQ Streams (Strimzi). Feel free to change the name my-cluster and/or the labels app: my-app, and of course anything else in there.

@jkeam
Copy link
Author

jkeam commented Aug 22, 2022

Before applying this yaml, make sure to install the AMQ Streams using the OCP UI and essentially just accept the defaults (unless there are things you really want to modify). The installation is essentially just a 1 click installation which is really nice, which is why I usually explain it that way.

You could also install via yaml instead of using the OCP UI and you can find instructions for that here: https://access.redhat.com/documentation/en-us/red_hat_amq_streams/2.1/html/deploying_and_upgrading_amq_streams_on_openshift/deploy-tasks_str#doc-wrapper

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