-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path10kafka.yaml
37 lines (37 loc) · 858 Bytes
/
10kafka.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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: kafka
namespace: default
spec:
selector:
matchLabels:
app: kafka
serviceName: "broker"
replicas: 3
template:
metadata:
labels:
app: kafka
annotations:
spec:
#nodeSelector:
# kubernetes.io/hostname: k8s-test2-node1
containers:
- name: broker
image: registry.cn-hangzhou.aliyuncs.com/limingmax/mykafka:1.1.4
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: ZOOKEEPERS
value: 192.168.193.1:30201
volumeMounts:
- name: kube-storage
mountPath: /root/.kube/
command: ['/bin/bash', '/root/init.sh']
volumes:
- name: kube-storage
hostPath:
path: /root/.kube/