/
elasticsearch.yaml
61 lines (61 loc) · 1.7 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
# This sample sets up an Elasticsearch cluster with 3 nodes.
apiVersion: elasticsearch.k8s.elastic.co/v1alpha1
kind: Elasticsearch
metadata:
name: elasticsearch-sample
spec:
version: 7.2.0
nodes:
- config:
# most Elasticsearch configuration parameters are possible to set, e.g:
node.attr.attr_name: attr_value
node.master: true
node.data: true
node.ingest: true
node.ml: true
podTemplate:
metadata:
labels:
# additional labels for pods
foo: bar
spec:
containers:
- name: elasticsearch
# specify resource limits and requests
resources:
limits:
memory: 4Gi
cpu: 1
env:
- name: ES_JAVA_OPTS
value: "-Xms2g -Xmx2g"
nodeCount: 3
# # request 2Gi of persistent data storage for pods in this topology element
# volumeClaimTemplates:
# - metadata:
# name: elasticsearch-data
# spec:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 2Gi
# storageClassName: standard
# # inject secure settings into Elasticsearch nodes from a k8s secret reference
# secureSettings:
# secretName: "ref-to-secret"
# http:
# service:
# spec:
# # expose this cluster Service with a LoadBalancer
# type: LoadBalancer
# tls:
# selfSignedCertificate:
# # add a list of SANs into the self-signed HTTP certificate
# subjectAltNames:
# - ip: 192.168.1.2
# - ip: 192.168.1.3
# - dns: elasticsearch-sample.example.com
# certificate:
# # provide your own certificate
# secretName: my-cert