Skip to content

Instantly share code, notes, and snippets.

@kevinhillinger
Last active June 11, 2019 14:55
Show Gist options
  • Save kevinhillinger/4565257402f15f878ef5d409f402933d to your computer and use it in GitHub Desktop.
Save kevinhillinger/4565257402f15f878ef5d409f402933d to your computer and use it in GitHub Desktop.
Pre-pulling base images using Windows Containers on AKS
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: prepull
spec:
selector:
matchLabels:
name: prepull
template:
metadata:
labels:
name: prepull
spec:
nodeSelector:
"beta.kubernetes.io/os": windows
tolerations:
- key: "os"
operator: "Equal"
value: "win"
effect: "NoSchedule"
initContainers:
- name: prepull
image: docker
command: ["docker", "pull", "mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019"]
volumeMounts:
- name: docker
mountPath: /var/run
volumes:
- name: docker
hostPath:
path: /var/run
containers:
- name: pause
image: <registry name>.azurecr.io/acr-auth-example
imagePullSecrets:
- name: acr-auth
The single use DaemonSet pattern and pre-pulling images in Kubernetes, Dec 26, 2017
http://blog.itaysk.com/2017/12/26/the-single-use-daemonset-pattern-and-prepulling-images-in-kubernetes
https://gist.github.com/itaysk/7bc3e56d69c4d72a549286d98fd557dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment