-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathelasticsearch.yaml
74 lines (73 loc) · 1.67 KB
/
elasticsearch.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
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
70
71
72
73
74
apiVersion: v1
kind: Service
metadata:
name: elasticsearch
namespace: elk-stack
spec:
ports:
- name: http-rest
protocol: TCP
port: 9200
targetPort: 9200
- name: tcp
protocol: TCP
port: 9300
targetPort: 9300
selector:
app: elasticsearch
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: elasticsearch
namespace: elk-stack
spec:
replicas: 1
selector:
matchLabels:
app: elasticsearch
template:
metadata:
labels:
app: elasticsearch
spec:
containers:
- name: elasticsearch
image: 'docker.elastic.co/elasticsearch/elasticsearch:7.15.2'
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: "1"
memory: 8Gi
requests:
cpu: 500m
memory: 4Gi
env:
- name: ES_JAVA_OPTS
value: '-Xmx2g -Xms2g'
- name: discovery.type
value: single-node
ports:
- name: http-rest
containerPort: 9200
protocol: TCP
- name: tcp
containerPort: 9300
protocol: TCP
volumeMounts:
- name: elasticsearch-data-volume
mountPath: /usr/share/elasticsearch/data
restartPolicy: Always
volumeClaimTemplates:
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: elasticsearch-data-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: ssd-ceph-fs
volumeMode: Filesystem