-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfluent-bit-daemonset.yaml
42 lines (40 loc) · 998 Bytes
/
fluent-bit-daemonset.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
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluent-bit
namespace: logging
labels:
k8s-app: fluent-bit-logging
spec:
selector:
matchLabels:
k8s-app: fluent-bit-logging
template:
metadata:
labels:
k8s-app: fluent-bit-logging
spec:
containers:
- name: fluent-bit
image: fluent/fluent-bit:latest
volumeMounts:
- name: varlog
mountPath: /var/log
- name: config
mountPath: /fluent-bit/etc/
- name: k8s-events-sidecar
image: bitnami/kubectl:latest
command: ["/bin/sh"]
args: ["-c", "while true; do kubectl get events --all-namespaces > /var/log/kube-events.log; sleep 60; done"]
securityContext:
runAsUser: 0
volumeMounts:
- name: varlog
mountPath: /var/log
volumes:
- name: varlog
hostPath:
path: /var/log
- name: config
configMap:
name: fluent-bit-config