-
Notifications
You must be signed in to change notification settings - Fork 17
/
elasticsearch.yml
89 lines (89 loc) · 1.98 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
apiVersion: v1
kind: ServiceAccount
metadata:
name: elasticsearch
namespace: kube-system
---
kind: ConfigMap
metadata:
name: elasticsearch-config
labels:
task: logging
k8s-app: logging-elasticsearch
namespace: kube-system
data:
elasticsearch.yml: |
cluster.name: local-cluster
network.host: 0.0.0.0
http.port: 9200
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: logging-elasticsearch
namespace: kube-system
labels:
task: logging
k8s-app: logging-elasticsearch
spec:
template:
metadata:
labels:
k8s-app: logging-elasticsearch
name: logging-elasticsearch
spec:
serviceAccount: elasticsearch
containers:
- name: logging-elasticsearch
securityContext:
capabilities:
add:
- IPC_LOCK
image: schikin/elasticsearch:5.5
imagePullPolicy: Always
resources:
limits:
memory: 2048Mi
requests:
memory: 2048Mi #1g - heap, 1g - offheap Lucene memory
env:
- name: ES_JAVA_OPTS
value: "-Xms1g -Xmx1g"
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- name: elasticsearch-storage
mountPath: /data
volumeMounts:
- name: elasticsearch-config
mountPath: /config
volumes:
- name: elasticsearch-storage
persistentVolumeClaim:
claimName: elasticsearch-storage
- name: elasticsearch-config
configMap:
name: elasticsearch-config
securityContext:
fsGroup: 101
---
apiVersion: v1
kind: Service
metadata:
labels:
task: logging
kubernetes.io/name: logging-elasticsearch
name: logging-elasticsearch
namespace: kube-system
spec:
ports:
- port: 9200
targetPort: 9200
name: http
- port: 9300
targetPort: 9300
name: internode
selector:
k8s-app: logging-elasticsearch