Skip to content

Instantly share code, notes, and snippets.

@blues-man
Created September 7, 2020 13:17
Show Gist options
  • Save blues-man/9570a4e46e8bc4feb4cf4a81c5759fa3 to your computer and use it in GitHub Desktop.
Save blues-man/9570a4e46e8bc4feb4cf4a81c5759fa3 to your computer and use it in GitHub Desktop.
Prepull Container Images in Kubernetes cluster via a Dameonset and Pause containers
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: images-prepull
namespace: foo
spec:
selector:
matchLabels:
app: images-prepull
template:
labels:
app: images-prepull
spec:
initContainers:
- name: prepull-something
image: 'quay.io/mcouliba/che-plugin-registry:2.2.0GA'
command:
- /bin/true
resources:
limits:
memory: 128Mi
requests:
memory: 128Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
containers:
- name: pause
image: gcr.io/google_containers/pause
resources:
limits:
memory: 128Mi
requests:
memory: 128Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
revisionHistoryLimit: 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment