Skip to content

Instantly share code, notes, and snippets.

@xiangshen-dk
Created September 28, 2021 20:12
Show Gist options
  • Save xiangshen-dk/4b24bc59c1be4b7397e73a6a98e35fab to your computer and use it in GitHub Desktop.
Save xiangshen-dk/4b24bc59c1be4b7397e73a6a98e35fab to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluent-bit
namespace: logging
labels:
k8s-app: fluent-bit-logging
version: v1
kubernetes.io/cluster-service: "true"
spec:
selector:
matchLabels:
k8s-app: fluent-bit-logging
template:
metadata:
labels:
k8s-app: fluent-bit-logging
version: v1
kubernetes.io/cluster-service: "true"
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "3020"
prometheus.io/path: /api/v1/metrics/prometheus
spec:
serviceAccountName: fluent-bit
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
terminationGracePeriodSeconds: 10
containers:
- name: fluent-bit
image: fluent/fluent-bit:1.8
imagePullPolicy: Always
ports:
- containerPort: 3020
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: fluent-bit-etc
mountPath: /fluent-bit/etc/
- name: mnt
mountPath: /mnt
readOnly: true
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: fluent-bit-etc
configMap:
name: fluent-bit-config
- name: mnt
hostPath:
path: /mnt
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment