Skip to content

Instantly share code, notes, and snippets.

@taylanisikdemir
Last active July 13, 2020 16:58
Show Gist options
  • Save taylanisikdemir/beedb7e774406d5001212ffb8853c478 to your computer and use it in GitHub Desktop.
Save taylanisikdemir/beedb7e774406d5001212ffb8853c478 to your computer and use it in GitHub Desktop.
# Use cmd below to check the mounted log volumes
# kubectl exec -it busybox -- /bin/sh
apiVersion: v1
kind: Pod
metadata:
name: busybox
spec:
containers:
- name: busybox
image: docker.io/busybox
args:
- /bin/sh
- -c
- >
i=0;
while true;
do
echo "$i: $(date)"
echo "$(date) INFO $i"
i=$((i+1));
sleep 1000;
done
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
terminationGracePeriodSeconds: 10
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment