2015-07-01 06:36:39 +00:00
|
|
|
apiVersion: v1
|
2015-04-23 22:07:05 +00:00
|
|
|
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
|
2015-07-07 07:43:07 +00:00
|
|
|
image: gcr.io/google_containers/fluentd-sidecar-es:1.1
|
2015-04-23 22:07:05 +00:00
|
|
|
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: {}
|