-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathlogstash-shipper.yaml
79 lines (76 loc) · 1.55 KB
/
logstash-shipper.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
apiVersion: v1
kind: ConfigMap
metadata:
name: logstash-shipper-config
namespace: logging
data:
logstash-shipper.conf: |
input {
beats {
port => 7788
host => "0.0.0.0"
}
}
output {
redis {
id => "logging_elk_redis"
host => ["logging-redis.logging"]
port => 6379
data_type => list
key => "logstash-logging_elk_redis"
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: logstash-shipper
namespace: logging
labels:
k8s-app: logstash-shipper
spec:
replicas: 1
selector:
matchLabels:
k8s-app: logstash-shipper
template:
metadata:
labels:
k8s-app: logstash-shipper
spec:
containers:
- name: logstash-shipper
image: registry.cn-shanghai.aliyuncs.com/k8s-log/logstash:6.3.2
ports:
- name: shipper
containerPort: 7788
protocol: TCP
readinessProbe:
tcpSocket:
port: 7788
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 3
volumeMounts:
- name: logstash-shipper-config
mountPath: /usr/local/logstash/config/pipeline
volumes:
- name: logstash-shipper-config
configMap:
name: logstash-shipper-config
---
apiVersion: v1
kind: Service
metadata:
name: logstash-shipper
namespace: logging
labels:
k8s-app: logstash-shipper
spec:
ports:
- name: shipper
port: 7788
protocol: TCP
targetPort: shipper
selector:
k8s-app: logstash-shipper