-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkafka.yaml
40 lines (40 loc) · 822 Bytes
/
kafka.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
apiVersion: v1
kind: Service
metadata:
name: kafka-svc
namespace: ephemeral-kafka
spec:
ports:
- port: 9092
protocol: TCP
selector:
service: kafka
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kafka
namespace: ephemeral-kafka
spec:
replicas: 2
template:
metadata:
labels:
service: kafka
spec:
containers:
- env:
- name: KAFKA_ADVERTISED_PORT
value: "9092"
- name: KAFKA_ZOOKEEPER_CONNECT
value: zookeeper-svc:2181
- name: KAFKA_ADVERTISED_HOST_NAME
valueFrom:
fieldRef:
fieldPath: status.podIP
image: wurstmeister/kafka:0.10.2.0-1
name: kafka
ports:
- containerPort: 9092
protocol: TCP
restartPolicy: Always