2018-03-13 18:17:48 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: fluentd-es
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
k8s-app: fluentd-es
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
|
|
---
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: fluentd-es
|
|
|
|
labels:
|
|
|
|
k8s-app: fluentd-es
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- "namespaces"
|
|
|
|
- "pods"
|
|
|
|
verbs:
|
|
|
|
- "get"
|
|
|
|
- "watch"
|
|
|
|
- "list"
|
|
|
|
---
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: fluentd-es
|
|
|
|
labels:
|
|
|
|
k8s-app: fluentd-es
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: fluentd-es
|
|
|
|
namespace: kube-system
|
|
|
|
apiGroup: ""
|
|
|
|
roleRef:
|
|
|
|
kind: ClusterRole
|
|
|
|
name: fluentd-es
|
|
|
|
apiGroup: ""
|
|
|
|
---
|
2019-05-06 20:42:55 +08:00
|
|
|
apiVersion: apps/v1
|
2018-03-13 18:17:48 +08:00
|
|
|
kind: DaemonSet
|
|
|
|
metadata:
|
2019-05-06 20:42:55 +08:00
|
|
|
name: fluentd-es-v2.4.0
|
2018-03-13 18:17:48 +08:00
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
k8s-app: fluentd-es
|
2019-05-06 20:42:55 +08:00
|
|
|
version: v2.4.0
|
2018-03-13 18:17:48 +08:00
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: fluentd-es
|
2019-05-06 20:42:55 +08:00
|
|
|
version: v2.4.0
|
2018-03-13 18:17:48 +08:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: fluentd-es
|
|
|
|
kubernetes.io/cluster-service: "true"
|
2019-05-06 20:42:55 +08:00
|
|
|
version: v2.4.0
|
2018-03-13 18:17:48 +08:00
|
|
|
# This annotation ensures that fluentd does not get evicted if the node
|
|
|
|
# supports critical pod annotation based priority scheme.
|
|
|
|
# Note that this does not guarantee admission on the nodes (#40573).
|
|
|
|
annotations:
|
|
|
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
2019-05-06 20:42:55 +08:00
|
|
|
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
|
2018-03-13 18:17:48 +08:00
|
|
|
spec:
|
2019-05-06 20:42:55 +08:00
|
|
|
priorityClassName: system-node-critical
|
2018-03-13 18:17:48 +08:00
|
|
|
serviceAccountName: fluentd-es
|
|
|
|
containers:
|
|
|
|
- name: fluentd-es
|
2019-05-06 20:42:55 +08:00
|
|
|
#image: k8s.gcr.io/fluentd-elasticsearch:v2.4.0
|
|
|
|
image: mirrorgooglecontainers/fluentd-elasticsearch:v2.4.0
|
2018-03-13 18:17:48 +08:00
|
|
|
env:
|
|
|
|
- name: FLUENTD_ARGS
|
|
|
|
value: --no-supervisor -q
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 500Mi
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 200Mi
|
|
|
|
volumeMounts:
|
|
|
|
- name: varlog
|
|
|
|
mountPath: /var/log
|
|
|
|
- name: varlibdockercontainers
|
|
|
|
mountPath: /var/lib/docker/containers
|
|
|
|
readOnly: true
|
|
|
|
- name: config-volume
|
|
|
|
mountPath: /etc/fluent/config.d
|
2019-05-06 20:42:55 +08:00
|
|
|
#nodeSelector:
|
|
|
|
#beta.kubernetes.io/fluentd-ds-ready: "true"
|
2018-03-13 18:17:48 +08:00
|
|
|
terminationGracePeriodSeconds: 30
|
|
|
|
volumes:
|
|
|
|
- name: varlog
|
|
|
|
hostPath:
|
|
|
|
path: /var/log
|
|
|
|
- name: varlibdockercontainers
|
|
|
|
hostPath:
|
|
|
|
path: /var/lib/docker/containers
|
|
|
|
- name: config-volume
|
|
|
|
configMap:
|
2019-05-06 20:42:55 +08:00
|
|
|
name: fluentd-es-config-v0.2.0
|