Skip to content

Instantly share code, notes, and snippets.

@grampelberg
Created January 30, 2018 20:30
Show Gist options
  • Save grampelberg/f1ea045824d1d53ffd92c2ddc7cc47f3 to your computer and use it in GitHub Desktop.
Save grampelberg/f1ea045824d1d53ffd92c2ddc7cc47f3 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: fileshare
spec:
containers:
- image: alpine
name: fileshare
command:
- /bin/sh
- -c
args:
- >
while true; do sleep 100; done
volumeMounts:
- name: varlog
mountPath: /var/log/containers
- name: varlogpods
mountPath: /var/log/pods
- name: dockerfs
mountPath: /var/lib/docker
- name: dockersock
mountPath: /var/run/docker.sock
- name: kubelet
mountPath: /var/lib/kubelet
- name: everything
mountPath: /host
securityContext:
privileged: true
- image: alpine
name: foobar
command:
- /bin/sh
- -c
- while true; do sleep 100; done
volumeMounts:
- name: varlog
mountPath: /var/log/containers
- name: varlogpods
mountPath: /var/log/pods
- name: dockerfs
mountPath: /var/lib/docker
- name: dockersock
mountPath: /var/run/docker.sock
- name: kubelet
mountPath: /var/lib/kubelet
volumes:
- name: varlog
hostPath:
path: /var/log/containers
- name: varlogpods
hostPath:
path: /var/log/pods
- name: dockerfs
hostPath:
path: /var/lib/docker/
- name: dockersock
hostPath:
path: /var/run/docker.sock
- name: kubelet
hostPath:
path: /var/lib/kubelet
- name: everything
hostPath:
path: /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment