forked from mast0910/kube-elk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogstash.yaml
86 lines (86 loc) · 1.9 KB
/
logstash.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
75
76
77
78
79
80
81
82
83
84
85
86
---
apiVersion: v1
kind: ConfigMap
metadata:
name: logstash-application
# namespace: elasticsearch
data:
logstash.conf: |-
input { stdin { } }
output {
elasticsearch {
hosts => "localhost:9200"
index => "logstash-%{+YYYY.MM.dd}"
sniffing => false
}
}
logstash.yml: |-
http.host: "0.0.0.0"
path.config: /usr/share/logstash/pipeline
xpack.monitoring.enabled: false
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: logstash-application
# namespace: elasticsearch
spec:
template:
metadata:
labels:
app: logstash-application
spec:
containers:
- image: docker.elastic.co/logstash/logstash:6.5.4
name: logstash-application
ports:
- name: logstash
containerPort: 5044
protocol: TCP
volumeMounts:
- name: config
mountPath: /usr/share/logstash/config/logstash.yml
subPath: logstash.yml
readOnly: true
- name: pipeline
mountPath: /usr/share/logstash/pipeline
readOnly: true
args:
- -f
- /usr/share/logstash/pipeline/logstash.conf
resources:
limits:
memory: 2Gi
cpu: "200m"
requests:
memory: 2Gi
cpu: "200m"
volumes:
- name: pipeline
configMap:
name: logstash-application
items:
- key: logstash.conf
path: logstash.conf
- name: config
configMap:
name: logstash-application
items:
- key: logstash.yml
path: logstash.yml
---
apiVersion: v1
kind: Service
metadata:
name: logstash-application
# namespace: elasticsearch
labels:
app: logstash-application
spec:
type: LoadBalancer
selector:
app: logstash-application
ports:
- name: logstash
port: 5044
targetPort: 5044