mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2026-01-08 00:01:40 +00:00
31 lines
845 B
YAML
31 lines
845 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-es:1.2
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 200Mi
|
|
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: {}
|