Skip to content

Instantly share code, notes, and snippets.

@unya
Created August 7, 2017 16:55
Show Gist options
  • Save unya/f3ac569113156b4305ca43822575590c to your computer and use it in GitHub Desktop.
Save unya/f3ac569113156b4305ca43822575590c to your computer and use it in GitHub Desktop.
pre-pull images on kubernetes
apiVersion: batch/v1
kind: Job
metadata:
name: image-pull
spec:
template:
metadata:
name: image-pull
spec:
volumes:
- name: docker
hostPath: /var/run/
containers:
- name: image-pull
image: docker
command: ["docker", "pull","my-custom-image"]
volumeMounts:
- name: docker
path: /var/run
restartPolicy: Never
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment