-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathelasticsearch.yml
69 lines (69 loc) · 1.52 KB
/
elasticsearch.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
apiVersion: v1
kind: Service
metadata:
name: elasticsearch-logging
namespace: efk
labels:
k8s-app: elasticsearch-logging
spec:
ports:
- port: 9200
name: api
protocol: TCP
targetPort: api
- port: 9300
name: transport
protocol: TCP
targetPort: transport
selector:
k8s-app: elasticsearch-logging
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: elasticsearch-logging
namespace: efk
labels:
k8s-app: elasticsearch-logging
spec:
serviceName: elasticsearch-logging
replicas: 3
template:
metadata:
labels:
k8s-app: elasticsearch-logging
spec:
containers:
- image: <docker-image>
name: elasticsearch-logging
env:
- name: "ES_JAVA_OPTS"
value: "-Xms512m -Xmx512m"
- name: "MINIMUM_MASTER_NODES"
value: "2"
- name: "NETWORK_HOST"
valueFrom:
fieldRef:
fieldPath: metadata.name
ports:
- containerPort: 9200
name: api
protocol: TCP
- containerPort: 9300
name: transport
protocol: TCP
volumeMounts:
- name: es-persistent-storage
mountPath: /usr/share/elasticsearch/data
securityContext:
fsGroup: 1000
volumeClaimTemplates:
- metadata:
name: es-persistent-storage
annotations:
volume.beta.kubernetes.io/storage-class: "efk-sc"
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 20Gi