apiVersion: apps/v1 kind: DaemonSet metadata: name: fluentd-papertrail namespace: kube-system labels: k8s-app: fluentd-papertrail version: v1 kubernetes.io/cluster-service: "true" spec: selector: matchLabels: k8s-app: fluentd-papertrail updateStrategy: type: RollingUpdate template: metadata: labels: k8s-app: fluentd-papertrail version: v1 kubernetes.io/cluster-service: "true" spec: tolerations: - key: node-role.kubernetes.io/master effect: NoSchedule containers: - name: fluentd image: quay.io/solarwinds/fluentd-kubernetes:v1.2-debian-papertrail-0.2.7-bugfix imagePullPolicy: Always env: - name: FLUENT_PAPERTRAIL_HOST value: 'logsN.papertrailapp.com' - name: FLUENT_PAPERTRAIL_PORT value: 'NNNNN' - name: FLUENT_HOSTNAME value: 'my-cluster-name' - name: K8S_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName resources: limits: cpu: 100m memory: 400Mi requests: cpu: 50m memory: 400Mi volumeMounts: - name: varlog mountPath: /var/log - name: varlibdockercontainers mountPath: /var/lib/docker/containers readOnly: true - name: config mountPath: /fluentd/etc/fluent.conf subPath: fluent.conf terminationGracePeriodSeconds: 30 volumes: - name: varlog hostPath: path: /var/log - name: varlibdockercontainers hostPath: path: /var/lib/docker/containers - name: config configMap: name: fluentd-papertrail-config items: - key: fluent.conf path: fluent.conf --- apiVersion: v1 kind: ConfigMap metadata: name: fluentd-papertrail-config namespace: kube-system data: fluent.conf: |- @include kubernetes.conf @include systemd.conf # Capture all unmatched tags @type papertrail papertrail_host "#{ENV['FLUENT_PAPERTRAIL_HOST']}" papertrail_port "#{ENV['FLUENT_PAPERTRAIL_PORT']}" num_threads 4 buffer_type file buffer_path /var/log/fluentd-buffer-papertrail