Skip to content

Instantly share code, notes, and snippets.

@yoonian
Forked from itaysk/prepull.yaml
Created January 7, 2020 00:51
Show Gist options
  • Select an option

  • Save yoonian/7d4c2bed6939fef9b9839f8bccb07459 to your computer and use it in GitHub Desktop.

Select an option

Save yoonian/7d4c2bed6939fef9b9839f8bccb07459 to your computer and use it in GitHub Desktop.
Kubernetes: Pre-pull images into node (moved to: https://github.com/itaysk/kube-imagepuller )
###
# There's a newer version available here:
# https://github.com/itaysk/kube-imagepuller
# All future updates will be made there.
# Please also post you questions as issues on that repo instead of commenting here
###
apiVersion: apps/v1beta2
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", "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