Custom Resource Definition
Once the Strimzi Operator is installed, you can deploy a Kafka cluster by applying a Kafka custom resource. Here's an example of a simple Kafka cluster configuration:
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: my-cluster
namespace: kafka
spec:
kafka:
version: 2.7.0
replicas: 3
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
config:
offsets.topic.replication.factor: 3
transaction.state.log.replication.factor: 3
transaction.state.log.min.isr: 2
log.message.format.version: "2.7"
zookeeper:
replicas: 3
entityOperator:
topicOperator: {}
userOperator: {}
to apply this configuration (saved into kafka.yaml) to the kubernetes cluster by using the below command.
kubectl apply -f kafka.yaml -n kafka