From 0fb3af91a0f9e9cc6b863153f9cca12a6be82c84 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 3 Oct 2023 16:28:43 +0200 Subject: [PATCH] Strimzi: Scale: Added 2 more brokers sudo mkdir /var/lib/local-storage/kafka-1 sudo mkdir /var/lib/local-storage/kafka-2 kubectl apply -f pv-kafka-1.yaml kubectl apply -f pv-kafka-2.yaml kubectl get pv kubectl -n juplo apply -f cluster.yaml kubectl -n juplo get pvc kubectl -n juplo get all --- strimzi-kafka/cluster.yaml | 12 ++++++------ strimzi-kafka/pv-kafka-1.yaml | 22 ++++++++++++++++++++++ strimzi-kafka/pv-kafka-2.yaml | 22 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 strimzi-kafka/pv-kafka-1.yaml create mode 100644 strimzi-kafka/pv-kafka-2.yaml diff --git a/strimzi-kafka/cluster.yaml b/strimzi-kafka/cluster.yaml index 2ed0da3..266f523 100644 --- a/strimzi-kafka/cluster.yaml +++ b/strimzi-kafka/cluster.yaml @@ -5,7 +5,7 @@ metadata: spec: kafka: version: 3.5.1 - replicas: 1 + replicas: 3 listeners: - name: plain port: 9092 @@ -16,11 +16,11 @@ spec: type: loadbalancer tls: false config: - offsets.topic.replication.factor: 1 - transaction.state.log.replication.factor: 1 - transaction.state.log.min.isr: 1 - default.replication.factor: 1 - min.insync.replicas: 1 + offsets.topic.replication.factor: 3 + transaction.state.log.replication.factor: 3 + transaction.state.log.min.isr: 3 + default.replication.factor: 3 + min.insync.replicas: 2 inter.broker.protocol.version: "3.5" storage: type: jbod diff --git a/strimzi-kafka/pv-kafka-1.yaml b/strimzi-kafka/pv-kafka-1.yaml new file mode 100644 index 0000000..0c0de01 --- /dev/null +++ b/strimzi-kafka/pv-kafka-1.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv-kafka-1 +spec: + capacity: + storage: 1Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: local-storage + local: + path: /var/lib/local-storage/kafka-1 + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - ryzen diff --git a/strimzi-kafka/pv-kafka-2.yaml b/strimzi-kafka/pv-kafka-2.yaml new file mode 100644 index 0000000..ff32f5a --- /dev/null +++ b/strimzi-kafka/pv-kafka-2.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv-kafka-2 +spec: + capacity: + storage: 1Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: local-storage + local: + path: /var/lib/local-storage/kafka-2 + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - ryzen -- 2.20.1