Last active
October 24, 2018 12:13
-
-
Save hectorj2f/7ed4ed8e930ed547d7d15489b1493afa to your computer and use it in GitHub Desktop.
This file contains 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-logging | |
namespace: kube-system | |
labels: | |
k8s-app: fluentd-logging | |
kubernetes.io/cluster-service: "true" | |
--- | |
kind: ClusterRole | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: fluentd-logging | |
labels: | |
k8s-app: fluentd-logging | |
kubernetes.io/cluster-service: "true" | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- "namespaces" | |
- "pods" | |
verbs: | |
- "get" | |
- "watch" | |
- "list" | |
--- | |
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: fluentd-logging | |
labels: | |
k8s-app: fluentd-logging | |
kubernetes.io/cluster-service: "true" | |
addonmanager.kubernetes.io/mode: Reconcile | |
subjects: | |
- kind: ServiceAccount | |
name: fluentd-logging | |
namespace: kube-system | |
apiGroup: "" | |
roleRef: | |
kind: ClusterRole | |
name: fluentd-logging | |
apiGroup: "" | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: fluentd | |
namespace: kube-system | |
labels: | |
k8s-app: fluentd-logging | |
version: v1 | |
kubernetes.io/cluster-service: "true" | |
spec: | |
template: | |
metadata: | |
labels: | |
k8s-app: fluentd-logging | |
version: v1 | |
kubernetes.io/cluster-service: "true" | |
spec: | |
serviceAccountName: fluentd-logging | |
tolerations: | |
- key: node-role.kubernetes.io/master | |
effect: NoSchedule | |
containers: | |
- name: fluentd | |
image: fluent/fluentd-kubernetes-daemonset:elasticsearch | |
env: | |
- name: FLUENT_ELASTICSEARCH_HOST | |
value: "elasticsearch-logging" | |
- name: FLUENT_ELASTICSEARCH_PORT | |
value: "9200" | |
- name: FLUENT_ELASTICSEARCH_SCHEME | |
value: "http" | |
# Option to configure elasticsearch plugin with self signed certs | |
# ================================================================ | |
- name: FLUENT_ELASTICSEARCH_SSL_VERIFY | |
value: "true" | |
# X-Pack Authentication | |
# ===================== | |
- name: FLUENT_ELASTICSEARCH_USER | |
value: "elastic" | |
- name: FLUENT_ELASTICSEARCH_PASSWORD | |
value: "changeme" | |
# Logz.io Authentication | |
# ====================== | |
- name: LOGZIO_TOKEN | |
value: "ThisIsASuperLongToken" | |
- name: FLUENT_UID | |
value: "0" | |
- name: LOGZIO_LOGTYPE | |
value: "kubernetes" | |
resources: | |
limits: | |
memory: 200Mi | |
requests: | |
cpu: 100m | |
memory: 200Mi | |
volumeMounts: | |
- name: varlog | |
mountPath: /var/log | |
- name: varlibdockercontainers | |
mountPath: /var/lib/docker/containers | |
readOnly: true | |
terminationGracePeriodSeconds: 30 | |
volumes: | |
- name: varlog | |
hostPath: | |
path: /var/log | |
- name: varlibdockercontainers | |
hostPath: | |
path: /var/lib/docker/containers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment