Created
November 25, 2021 21:47
-
-
Save pmuir/146d63d3544c06653b42f1c73dd293e4 to your computer and use it in GitHub Desktop.
Deploy producers and consumers to Kubernetes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: kafka-consumer-perf-test | |
spec: | |
replicas: 12 | |
selector: | |
matchLabels: | |
app: kafka-consumer-perf-test | |
template: | |
metadata: | |
creationTimestamp: null | |
labels: | |
app: kafka-consumer-perf-test | |
spec: | |
volumes: | |
- name: config | |
secret: | |
secretName: kafka-properties | |
containers: | |
name: kafka-consumer-perf-test | |
command: | |
- bin/kafka-consumer-perf-test.sh | |
env: | |
- name: BOOTSTRAP_SERVER | |
valueFrom: | |
secretKeyRef: | |
name: kafka-properties | |
key: bootstrapServer | |
imagePullPolicy: IfNotPresent | |
volumeMounts: | |
- name: config | |
readOnly: true | |
mountPath: /config | |
terminationMessagePolicy: File | |
image: 'quay.io/strimzi/kafka:latest-kafka-2.8.1' | |
args: | |
- '--consumer.config=/config/kaombat.properties' | |
- '--bootstrap-server="$(BOOTSTRAP_SERVER)' | |
- '--topic=foo' | |
- '--messages=1000000' | |
restartPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: kafka-producer-perf-test | |
spec: | |
replicas: 14 | |
selector: | |
matchLabels: | |
app: kafka-producer-perf-test | |
template: | |
metadata: | |
creationTimestamp: null | |
labels: | |
app: kafka-producer-perf-test | |
spec: | |
volumes: | |
- name: config | |
secret: | |
secretName: kafka-properties | |
defaultMode: 420 | |
containers: | |
- name: kafka-producer-perf-test | |
image: 'quay.io/strimzi/kafka:latest-kafka-2.8.1' | |
command: | |
- bin/kafka-producer-perf-test.sh | |
- '--producer.config=/config/kaombat.properties' | |
- '--throughput=1' | |
- '--record-size=10' | |
- '--topic=foo' | |
- '--num-records=1000000' | |
resources: {} | |
volumeMounts: | |
- name: config | |
readOnly: true | |
mountPath: /config | |
terminationMessagePath: /dev/termination-log | |
terminationMessagePolicy: File | |
imagePullPolicy: IfNotPresent | |
restartPolicy: Always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment