Skip to content

Instantly share code, notes, and snippets.

@mindw
Forked from itaysk/prepull.yaml
Last active December 17, 2017 17:58
Show Gist options
  • Select an option

  • Save mindw/297604698692328a88e0de2d8fa305c8 to your computer and use it in GitHub Desktop.

Select an option

Save mindw/297604698692328a88e0de2d8fa305c8 to your computer and use it in GitHub Desktop.
Kubernetes: Pre-pull images into node
apiVersion: apps/v1beta1
kind: DaemonSet
metadata:
name: prepull
spec:
selector:
matchLabels:
name: prepull
template:
metadata:
labels:
name: prepull
spec:
initContainers:
- name: prepull
image: docker
command: ["docker", "pull", "hello-world"]
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