Skip to content

Instantly share code, notes, and snippets.

@jstangroome
Created May 25, 2018 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstangroome/57bf2cd130eb0e7c71d0caf9bd76bbb6 to your computer and use it in GitHub Desktop.
Save jstangroome/57bf2cd130eb0e7c71d0caf9bd76bbb6 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: example
spec:
initContainers:
- name: file-copy
image: busybox:latest
command:
- cp
- /src/big-file
- /dst/
volumeMounts:
- name: source
mountPath: /src
- name: destination
mountPath: /dst
containers:
- name: app
image: alpine:latest
command:
- bash
- -c
- "stat /data/big-file; sleep 300"
volumeMounts:
- name: destination
mountPath: /data/
volumes:
- name: source
hostPath:
path: /home/some-user/big-file
- name: destination
emptyDir: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment