Skip to content

Instantly share code, notes, and snippets.

@esevan
Forked from itaysk/prepull.yaml
Created February 28, 2019 10:46
Show Gist options
  • Save esevan/62e4773c405be3cfc30bc527330d18c4 to your computer and use it in GitHub Desktop.
Save esevan/62e4773c405be3cfc30bc527330d18c4 to your computer and use it in GitHub Desktop.
Kubernetes: Pre-pull images into node
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: prepull
annotations:
source: "https://gist.github.com/itaysk/7bc3e56d69c4d72a549286d98fd557dd"
spec:
selector:
matchLabels:
name: prepull
template:
metadata:
labels:
name: prepull
spec:
initContainers:
- name: prepull
image: docker
command:
- docker
- pull
- # image name to pull
volumeMounts:
- name: docker
mountPath: /var/run
volumes:
- name: docker
hostPath:
path: /var/run
containers:
- name: pause
image: gcr.io/google_containers/pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment