-
Notifications
You must be signed in to change notification settings - Fork 8
/
elasticsearch.yaml
69 lines (69 loc) · 2 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
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: elasticsearch
namespace: kube-system
spec:
serviceName: "elasticsearch"
replicas: 3
podManagementPolicy: Parallel
template:
metadata:
labels:
role: elasticsearch
spec:
terminationGracePeriodSeconds: 10
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node1
- node2
- master1
- master2
- master3
containers:
- name: elasticsearch
image: elasticsearch:2
command:
- elasticsearch
- "-Ddiscovery.zen.ping.unicast.hosts=elasticsearch-0.elasticsearch,elasticsearch-1.elasticsearch,elasticsearch-2.elasticsearch"
- "-Ddiscovery.zen.minimum_master_nodes=2"
- "-Ddiscovery.zen.ping.unicast.hosts.resolve_timeout=30s"
- "-Ddiscovery.zen.ping_timeout=30s"
- "-Des.insecure.allow.root=true"
- "-Dcluster.name=graylog"
env:
- name: TZ
value: "Asia/Shanghai"
- name: ES_JAVA_OPTS
value: "-Xms2g -Xmx2g"
ports:
- containerPort: 9200
name: http
- containerPort: 9300
name: transport
volumeMounts:
- name: elasticsearch-persistent-storage
mountPath: /usr/share/elasticsearch/data
resources:
requests:
cpu: .10
memory: 2560Mi
limits:
cpu: .75
memory: 3072Mi
volumeClaimTemplates:
- metadata:
name: elasticsearch-persistent-storage
annotations:
volume.beta.kubernetes.io/storage-class: "fast"
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 200Gi