Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (29 sloc) 601 Bytes
apiVersion: v1
kind: Pod
metadata:
name: multiple-file-to-host-pod
spec:
containers:
- name: main-container
image: busybox
args:
- /bin/sh
- -c
- >
i=0;
while true;
do
echo "$i: $(date) dog" >> /var/log/mylogs/1.log;
echo "$i: $(date) cat" >> /var/log/mylogs/2.log;
i=$((i+1));
sleep 1;
done
volumeMounts:
- name: logs
mountPath: /var/log/mylogs
volumes:
- name: logs
hostPath:
# directory location on host
path: /var/log/my-app-logs
type: Directory