Skip to content

Instantly share code, notes, and snippets.

@ikuwow
Created September 23, 2016 07:56
Show Gist options
  • Save ikuwow/ef19f011664d1221e6d541dac599e37d to your computer and use it in GitHub Desktop.
Save ikuwow/ef19f011664d1221e6d541dac599e37d to your computer and use it in GitHub Desktop.
logtest-counter.yml
apiVersion: v1
kind: Pod
metadata:
name: counter-logger
spec:
containers:
- name: date-count
image: ubuntu:14.04
args: [bash, -c, 'for ((i = 0; ; i++)); do echo "$i: $(date)" >> /var/log/datelog.log; echo $RANDOM >> /var/log/randomlog.log; sleep 3; done']
volumeMounts:
- name: log-storage
mountPath: /var/log
- name: sidecar-log-collector
image: gcr.io/google_containers/fluentd-sidecar-gcp:1.4
resources:
limits:
cpu: 100m
memory: 200Mi
env:
- name: FILES_TO_COLLECT
value: "/mnt/log/datelog.log /mnt/log/randomlog.log"
volumeMounts:
- name: log-storage
readOnly: true
mountPath: /mnt/log
volumes:
- name: log-storage
emptyDir: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment