apiVersion: apps/v1 kind: DaemonSet metadata: name: fluent-bit namespace: logging 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.4.6 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 KIAMOL chapter 17 :) apiVersion: v1 kind: ServiceAccount metadata: name: fluent-bit namespace: logging --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: fluent-bit labels: ecs: v2 rules: - apiGroups: [""] resources: - namespaces - pods verbs: ["get", "list", "watch"] --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: name: fluent-bit labels: ecs: v2 roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: fluent-bit subjects: - kind: ServiceAccount name: fluent-bit namespace: logging