aboutsummaryrefslogtreecommitdiff
path: root/logging/fluentd.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'logging/fluentd.yaml')
-rw-r--r--logging/fluentd.yaml98
1 files changed, 98 insertions, 0 deletions
diff --git a/logging/fluentd.yaml b/logging/fluentd.yaml
new file mode 100644
index 0000000..089c184
--- /dev/null
+++ b/logging/fluentd.yaml
@@ -0,0 +1,98 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: fluentd
+ namespace: kube-logging
+ labels:
+ app: fluentd
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: fluentd
+ labels:
+ app: fluentd
+rules:
+- apiGroups:
+ - ""
+ resources:
+ - pods
+ - namespaces
+ verbs:
+ - get
+ - list
+ - watch
+---
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: fluentd
+roleRef:
+ kind: ClusterRole
+ name: fluentd
+ apiGroup: rbac.authorization.k8s.io
+subjects:
+- kind: ServiceAccount
+ name: fluentd
+ namespace: kube-logging
+---
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+ name: fluentd
+ namespace: kube-logging
+ labels:
+ app: fluentd
+spec:
+ selector:
+ matchLabels:
+ app: fluentd
+ template:
+ metadata:
+ labels:
+ app: fluentd
+ spec:
+ serviceAccount: fluentd
+ serviceAccountName: fluentd
+ tolerations:
+ - key: node-role.kubernetes.io/master
+ effect: NoSchedule
+ containers:
+ - name: fluentd
+ image: fluent/fluentd-kubernetes-daemonset:v1.4.2-debian-elasticsearch-1.1
+ env:
+ - name: FLUENT_ELASTICSEARCH_HOST
+ value: "elasticsearch.kube-logging.svc.cluster.local"
+ - name: FLUENT_ELASTICSEARCH_PORT
+ value: "9200"
+ - name: FLUENT_ELASTICSEARCH_SCHEME
+ value: "http"
+ - name: FLUENTD_SYSTEMD_CONF
+ value: disable
+ - name: FLUENT_ELASTICSEARCH_SED_DISABLE
+ value: yeah
+ resources:
+ limits:
+ memory: 512Mi
+ requests:
+ cpu: 100m
+ memory: 200Mi
+ volumeMounts:
+ - name: fluentd-config
+ mountPath: /fluentd/etc/
+ - name: varlog
+ mountPath: /var/log
+ - name: varlibdockercontainers
+ mountPath: /var/lib/docker/containers
+ readOnly: true
+ terminationGracePeriodSeconds: 30
+ volumes:
+ - name: fluentd-config
+ configMap:
+ name: fluentd-config
+ - name: varlog
+ hostPath:
+ path: /var/log
+ - name: varlibdockercontainers
+ hostPath:
+ path: /var/lib/docker/containers