-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathfluentd-es.yaml
89 lines (89 loc) · 2.21 KB
/
fluentd-es.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
87
88
89
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
labels:
k8s-addon: fluentd-elasticsearch.addons.k8s.io
name: fluentd-elasticsearch
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "list", "watch"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: fluentd-elasticsearch
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: fluentd-elasticsearch
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: fluentd-elasticsearch
subjects:
- kind: ServiceAccount
name: fluentd-elasticsearch
namespace: kube-system
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
k8s-app: fluentd-elasticsearch
k8s-addon: fluentd-elasticsearch.addons.k8s.io
name: fluentd-elasticsearch
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: fluentd-elasticsearch
template:
metadata:
labels:
k8s-app: fluentd-elasticsearch
name: fluentd-elasticsearch
namespace: kube-system
spec:
serviceAccountName: fluentd-elasticsearch
containers:
- image: onfido/fluentd-es-aws:latest
imagePullPolicy: Always
name: fluentd-elasticsearch
resources:
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- mountPath: /var/log
name: varlog
- mountPath: /var/lib/docker/containers
name: varlibdockercontainers
readOnly: true
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: fluentd-elasticsearch
key: access-key
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: fluentd-elasticsearch
key: secret-key
- name: AWS_ELASTICSEARCH_URL
value: https://ES_DOMAIN.eu-west-1.es.amazonaws.com
- name: AWS_REGION
value: eu-west-1
- name: LOGSTASH_PREFIX
value: fluentd
volumes:
- hostPath:
path: /var/log
name: varlog
- hostPath:
path: /var/lib/docker/containers
name: varlibdockercontainers