WIP:prometheus
[demos/kafka/monitoring] / kubernetes / kafka-4-deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   labels:
5     kafka: kafka-4
6   name: kafka-4
7   namespace: kafka
8 spec:
9   replicas: 1
10   selector:
11     matchLabels:
12       kafka: kafka-4
13   strategy:
14     type: Recreate
15   template:
16     metadata:
17       labels:
18         kafka: kafka-4
19     spec:
20       containers:
21         - env:
22             - name: ALLOW_PLAINTEXT_LISTENER
23               value: "yes"
24             - name: KAFKA_KRAFT_CLUSTER_ID
25               value: aDOok3cnTIGJ8pIaKs5Bxg
26             - name: KAFKA_BROKER_ID
27               value: "4"
28             - name: KAFKA_CFG_ADVERTISED_LISTENERS
29               value: BROKER://kafka-4:9092, LOCALHOST://localhost:9084
30             - name: KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE
31               value: "false"
32             - name: KAFKA_CFG_INTER_BROKER_LISTENER_NAME
33               value: BROKER
34             - name: KAFKA_CFG_LISTENERS
35               value: BROKER://:9092, LOCALHOST://:9084
36             - name: KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP
37               value: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT
38             - name: KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR
39               value: "3"
40             - name: KAFKA_CFG_ZOOKEEPER_CONNECT
41               value: zookeeper:2181
42             - name: KAFKA_ENABLE_KRAFT
43               value: "false"
44             - name: KAFKA_OPTS
45               value: -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7000 -Dcom.sun.management.jmxremote.authenticate=false
46           image: bitnami/kafka:3.4.0
47           name: kafka-4
48           ports:
49             - containerPort: 9084
50               hostPort: 9084
51               protocol: TCP
52             - containerPort: 7000
53               hostPort: 7004
54               protocol: TCP
55           resources: {}
56           volumeMounts:
57             - mountPath: /bitnami/kafka
58               name: kafka-4
59       restartPolicy: Always
60       volumes:
61         - name: kafka-4
62           persistentVolumeClaim:
63             claimName: kafka-4
64 status: {}