forked from Yolean/kubernetes-kafka
-
Notifications
You must be signed in to change notification settings - Fork 23
/
50kafka.yml
46 lines (46 loc) · 1.11 KB
/
50kafka.yml
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
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: kafka
namespace: kafka
spec:
serviceName: "broker"
replicas: 3
template:
metadata:
labels:
app: kafka
annotations:
pod.alpha.kubernetes.io/initialized: "true"
pod.alpha.kubernetes.io/init-containers: '[
]'
spec:
containers:
- name: broker
image: solsson/kafka:0.10.0.1
ports:
- containerPort: 9092
command:
- sh
- -c
- "./bin/kafka-server-start.sh config/server.properties --override broker.id=$(hostname | awk -F'-' '{print $2}')"
volumeMounts:
- name: datadir
mountPath: /opt/kafka/data
# - name: conf
# mountPath: /opt/kafka/config/server.properties
#volumes:
#- name: conf
# configMap:
# name: conf-d
volumeClaimTemplates:
- metadata:
name: datadir
namespace: kafka
annotations:
volume.alpha.kubernetes.io/storage-class: anything
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 100Mi