fluentd-es-ds.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. apiVersion: v1
  2. kind: ServiceAccount
  3. metadata:
  4. name: fluentd-es
  5. namespace: kube-system
  6. labels:
  7. k8s-app: fluentd-es
  8. addonmanager.kubernetes.io/mode: Reconcile
  9. ---
  10. kind: ClusterRole
  11. apiVersion: rbac.authorization.k8s.io/v1
  12. metadata:
  13. name: fluentd-es
  14. labels:
  15. k8s-app: fluentd-es
  16. addonmanager.kubernetes.io/mode: Reconcile
  17. rules:
  18. - apiGroups:
  19. - ""
  20. resources:
  21. - "namespaces"
  22. - "pods"
  23. verbs:
  24. - "get"
  25. - "watch"
  26. - "list"
  27. ---
  28. kind: ClusterRoleBinding
  29. apiVersion: rbac.authorization.k8s.io/v1
  30. metadata:
  31. name: fluentd-es
  32. labels:
  33. k8s-app: fluentd-es
  34. addonmanager.kubernetes.io/mode: Reconcile
  35. subjects:
  36. - kind: ServiceAccount
  37. name: fluentd-es
  38. namespace: kube-system
  39. apiGroup: ""
  40. roleRef:
  41. kind: ClusterRole
  42. name: fluentd-es
  43. apiGroup: ""
  44. ---
  45. apiVersion: apps/v1
  46. kind: DaemonSet
  47. metadata:
  48. name: fluentd-es-v2.8.0
  49. namespace: kube-system
  50. labels:
  51. k8s-app: fluentd-es
  52. version: v2.8.0
  53. addonmanager.kubernetes.io/mode: Reconcile
  54. spec:
  55. selector:
  56. matchLabels:
  57. k8s-app: fluentd-es
  58. version: v2.8.0
  59. template:
  60. metadata:
  61. labels:
  62. k8s-app: fluentd-es
  63. version: v2.8.0
  64. # This annotation ensures that fluentd does not get evicted if the node
  65. # supports critical pod annotation based priority scheme.
  66. # Note that this does not guarantee admission on the nodes (#40573).
  67. annotations:
  68. seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
  69. spec:
  70. priorityClassName: system-node-critical
  71. serviceAccountName: fluentd-es
  72. containers:
  73. - name: fluentd-es
  74. image: quay.io/fluentd_elasticsearch/fluentd:v2.8.0
  75. env:
  76. - name: FLUENTD_ARGS
  77. value: --no-supervisor -q
  78. resources:
  79. limits:
  80. memory: 500Mi
  81. requests:
  82. cpu: 100m
  83. memory: 200Mi
  84. volumeMounts:
  85. - name: varlog
  86. mountPath: /var/log
  87. - name: varlibdockercontainers
  88. mountPath: /var/lib/docker/containers
  89. readOnly: true
  90. - name: config-volume
  91. mountPath: /etc/fluent/config.d
  92. ports:
  93. - containerPort: 24231
  94. name: prometheus
  95. protocol: TCP
  96. livenessProbe:
  97. tcpSocket:
  98. port: prometheus
  99. initialDelaySeconds: 5
  100. timeoutSeconds: 10
  101. readinessProbe:
  102. tcpSocket:
  103. port: prometheus
  104. initialDelaySeconds: 5
  105. timeoutSeconds: 10
  106. terminationGracePeriodSeconds: 30
  107. volumes:
  108. - name: varlog
  109. hostPath:
  110. path: /var/log
  111. - name: varlibdockercontainers
  112. hostPath:
  113. path: /var/lib/docker/containers
  114. - name: config-volume
  115. configMap:
  116. name: fluentd-es-config-v0.2.0