Skip to content

Instantly share code, notes, and snippets.

@xiangshen-dk
Last active October 11, 2020 22:51
Show Gist options
  • Save xiangshen-dk/84a1bcc7ee3295d29d5c172d0f962842 to your computer and use it in GitHub Desktop.
Save xiangshen-dk/84a1bcc7ee3295d29d5c172d0f962842 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: "2020"
prometheus.io/path: /api/v1/metrics/prometheus
spec:
serviceAccountName: fluent-bit
terminationGracePeriodSeconds: 10
containers:
- name: fluent-bit
image: gcr.io/shenxiang-democlound-test/fluent-bit-out-gcs
imagePullPolicy: Always
ports:
- containerPort: 2020
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: fluent-bit-config
mountPath: /fluent-bit/etc/
- name: mnt
mountPath: /mnt
readOnly: true
- name: tmp
mountPath: /testing
- name: google-cloud-key
mountPath: /var/secrets/google
env:
- name: GOOGLE_SERVICE_CREDENTIALS
value: /var/secrets/google/key.json
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: fluent-bit-config
configMap:
name: fluent-bit-config
- name: mnt
hostPath:
path: /mnt
- name: tmp
hostPath:
path: /tmp
type: Directory
- name: google-cloud-key
secret:
secretName: fluent-bit-logging-key
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