-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkafka.yaml
More file actions
41 lines (41 loc) · 844 Bytes
/
kafka.yaml
File metadata and controls
41 lines (41 loc) · 844 Bytes
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka
spec:
replicas: 1
selector:
matchLabels:
app: kafka
template:
metadata:
labels:
app: kafka
spec:
containers:
- name: kafka
image: confluentinc/cp-kafka:latest
env:
- name: KAFKA_BROKER_ID
value: "1"
- name: KAFKA_ZOOKEEPER_CONNECT
value: zookeeper:2181
- name: KAFKA_ADVERTISED_LISTENERS
value: PLAINTEXT://kafka:9092
- name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
value: "1"
ports:
- containerPort: 9092
---
apiVersion: v1
kind: Service
metadata:
name: kafka
spec:
type: LoadBalancer
selector:
app: kafka
ports:
- protocol: TCP
port: 9092
targetPort: 9092