fluentd-es-ds.yaml 2.7 KB

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