Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (31 sloc) 635 Bytes
apiVersion: v1
kind: Pod
metadata:
name: single-file-to-output-pod
spec:
containers:
- name: main-container
image: busybox
args:
- /bin/sh
- -c
- >
i=0;
while true;
do
echo "$i: $(date) dog" >> /var/log/mylogs/log.log;
i=$((i+1));
sleep 1;
done
volumeMounts:
- name: logs
mountPath: /var/log/mylogs
- name: log-display
image: busybox
args: [/bin/sh, -c, 'tail -n+1 -f /var/log/mylogs/log.log']
volumeMounts:
- name: logs
mountPath: /var/log/mylogs
volumes:
- name: logs
emptyDir: {}