Files
kubernetes/contrib/logging/fluentd-sidecar-gcp/logging-sidecar-example.yaml
2015-07-01 00:23:16 -07:00

27 lines
777 B
YAML

apiVersion: v1
kind: Pod
metadata:
labels:
example: logging-sidecar
name: logging-sidecar-example
spec:
containers:
- name: synthetic-logger
image: ubuntu:14.04
command: ["bash", "-c", "i=\"0\"; while true; do echo \"`hostname`: $i \" >> /var/log/synthetic-count.log; date --rfc-3339 ns >> /var/log/synthetic-dates.log; sleep 4; i=$[$i+1]; done"]
volumeMounts:
- name: log-storage
mountPath: /var/log
- name: sidecar-log-collector
image: gcr.io/google_containers/fluentd-sidecar-gcp:1.1
env:
- name: FILES_TO_COLLECT
value: "/mnt/log/synthetic-count.log /mnt/log/synthetic-dates.log"
volumeMounts:
- name: log-storage
readOnly: true
mountPath: /mnt/log
volumes:
- name: log-storage
emptyDir: {}