75 lines
1.6 KiB
YAML
75 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: fluent-bit
|
|
namespace: kiamol-ch13-logging
|
|
labels:
|
|
kiamol: ch13
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: fluent-bit
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: fluent-bit
|
|
spec:
|
|
serviceAccountName: fluent-bit
|
|
containers:
|
|
- name: fluent-bit
|
|
image: fluent/fluent-bit:1.8.11
|
|
volumeMounts:
|
|
- name: fluent-bit-config
|
|
mountPath: /fluent-bit/etc/
|
|
- name: varlog
|
|
mountPath: /var/log
|
|
- name: varlibdockercontainers
|
|
mountPath: /var/lib/docker/containers
|
|
readOnly: true
|
|
volumes:
|
|
- name: fluent-bit-config
|
|
configMap:
|
|
name: fluent-bit-config
|
|
- name: varlog
|
|
hostPath:
|
|
path: /var/log
|
|
- name: varlibdockercontainers
|
|
hostPath:
|
|
path: /var/lib/docker/containers
|
|
---
|
|
# RBAC configuration - ignore this until we get to chapter 17 :)
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: fluent-bit
|
|
namespace: kiamol-ch13-logging
|
|
labels:
|
|
kiamol: ch13
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: fluent-bit
|
|
labels:
|
|
kiamol: ch13
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources:
|
|
- namespaces
|
|
- pods
|
|
verbs: ["get", "list", "watch"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: fluent-bit
|
|
labels:
|
|
kiamol: ch13
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: fluent-bit
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: fluent-bit
|
|
namespace: kiamol-ch13-logging |