Last active
October 27, 2018 21:51
-
-
Save AjeetK/b460146c3b4fa9af43c6133116e2cf16 to your computer and use it in GitHub Desktop.
Fluentd Configmap For Kubernetes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: fluentd-es | |
namespace: default | |
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: default | |
apiGroup: "" | |
roleRef: | |
kind: ClusterRole | |
name: fluentd-es | |
apiGroup: "" | |
--- | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: fluentd-es-v2.2.0 | |
namespace: default | |
labels: | |
k8s-app: fluentd-es | |
version: v2.2.0 | |
kubernetes.io/cluster-service: "true" | |
addonmanager.kubernetes.io/mode: Reconcile | |
spec: | |
selector: | |
matchLabels: | |
k8s-app: fluentd-es | |
version: v2.2.0 | |
template: | |
metadata: | |
labels: | |
k8s-app: fluentd-es | |
kubernetes.io/cluster-service: "true" | |
version: v2.2.0 | |
# 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: '' | |
seccomp.security.alpha.kubernetes.io/pod: 'docker/default' | |
spec: | |
priorityClassName: system-node-critical | |
serviceAccountName: fluentd-es | |
containers: | |
- name: fluentd-es | |
image: k8s.gcr.io/fluentd-elasticsearch:v2.2.0 | |
env: | |
- name: FLUENTD_ARGS | |
value: --no-supervisor -q -v | |
- name: FLUENT_ELASTICSEARCH_HOST | |
value: 35.237.201.150 | |
- name: FLUENT_ELASTICSEARCH_PORT | |
value: "9200" | |
- name: FLUENT_ELASTICSEARCH_SCHEME | |
value: "tcp" | |
resources: | |
limits: | |
memory: 200Mi | |
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 | |
nodeSelector: | |
beta.kubernetes.io/fluentd-ds-ready: "true" | |
terminationGracePeriodSeconds: 30 | |
imagePullSecrets: | |
- name: regsecret | |
volumes: | |
- name: varlog | |
hostPath: | |
path: /var/log | |
- name: varlibdockercontainers | |
hostPath: | |
path: /var/lib/docker/containers | |
- name: config-volume | |
configMap: | |
name: fluentd-es-config-v0.1.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment