forked from Cryptophobia/graylog-kubernetes-mongo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathelasticsearch-deployment.yaml
73 lines (73 loc) · 2.15 KB
/
elasticsearch-deployment.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
# https://medium.com/google-cloud/a-guide-to-deploy-elasticsearch-cluster-on-google-kubernetes-engine-52f67743ee98
apiVersion: extensions/v1beta1
kind: Deployment
annotations:
kompose.version: 1.17.0 ()
creationTimestamp: null
labels:
service: elasticsearch
name: elasticsearch
namespace: graylog
spec:
replicas: 4
selector:
matchLabels:
service: elasticsearch
strategy: {}
volumeClaimTemplates:
- metadata:
name: data
labels:
app: elasticsearch
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: default
# NOTE: You can increase the storage size
resources:
requests:
storage: 10Gi
template:
metadata:
creationTimestamp: null
labels:
service: elasticsearch
spec:
terminationGracePeriodSeconds: 300
containers:
- env:
- name: ES_JAVA_OPTS
value: -Xms512m -Xmx512m
- name: bootstrap.memory_lock
value: "true"
- name: cluster.name
value: graylog
- name: node.name
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: xpack.security.enabled
value: "false"
# NOTE: This will tell the elasticsearch node where to connect to other nodes to form a cluster
- name: discovery.zen.ping.unicast.hosts
value: "elasticsearch-0.elasticsearch.default.svc.cluster.local,elasticsearch-1.elasticsearch.default.svc.cluster.local,elasticsearch-2.elasticsearch.default.svc.cluster.local,elasticsearch-3.elasticsearch.default.svc.cluster.local"
- name: discovery.zen.minimum_master_nodes
value: "2"
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.14
ports:
- containerPort: 9200
name: rest
protocol: TCP
- containerPort: 9300
name: inter-node
protocol: TCP
volumeMounts:
- name: data
mountPath: /usr/share/elasticsearch/data
name: elasticsearch
resources:
requests:
memory: 8Gi
limits:
memory: 16Gi
restartPolicy: Always
status: {}