-
Notifications
You must be signed in to change notification settings - Fork 5
/
kafka-deployment.yaml
52 lines (52 loc) · 1.57 KB
/
kafka-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
kind: Deployment
apiVersion: apps/v1
metadata:
name: kafka-broker0
spec:
replicas: 1
selector:
matchLabels:
app: kafka
id: "0"
template:
metadata:
labels:
app: kafka
id: "0"
spec:
containers:
- name: kafka
image: wurstmeister/kafka
ports:
- containerPort: 9092
env:
# - name: KAFKA_LISTENERS
# value: "LISTENER_INT://localhost:29092,LISTENER_EXT://kafka-service:9092"
# - name: KAFKA_ADVERTISED_LISTENERS
# value: "LISTENER_INT://localhost:29092,LISTENER_EXT://kafka-service:9092"
# - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
# value: "LISTENER_INT:PLAINTEXT,LISTENER_EXT:PLAINTEXT"
# - name: KAFKA_INTER_BROKER_LISTENER_NAME
# value: "LISTENER_EXT"
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: KAFKA_LISTENERS
value: "LISTENER_INT://0.0.0.0:9092"
- name: KAFKA_ADVERTISED_LISTENERS
value: "LISTENER_INT://$(MY_POD_IP):9092"
- name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
value: "LISTENER_INT:PLAINTEXT"
- name: KAFKA_INTER_BROKER_LISTENER_NAME
value: "LISTENER_INT"
#- name: KAFKA_ADVERTISED_PORT
# value: "9092"
#- name: KAFKA_ADVERTISED_HOST_NAME
# value: kafka-service
- name: KAFKA_ZOOKEEPER_CONNECT
value: zoo1:2181
- name: KAFKA_BROKER_ID
value: "0"
- name: KAFKA_CREATE_TOPICS
value: topic:1:1