apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: preload
  namespace: preload
spec:
  selector:
    matchLabels:
      name: preload
  template:
    metadata:
      labels:
        name: preload
    spec:
      initContainers:
      {{range $idx, $image := .Images}}
      - name: preload-{{$idx}}
        image: docker
        command: ["docker", "pull", "{{$image}}"]
        volumeMounts:
        - name: docker
          mountPath: /var/run
      {{end}}
      volumes:
      - name: docker
        hostPath:
          path: /var/run
      containers:
      - name: pause
        image: gcr.io/google_containers/pause

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: preload
  namespace: preload
spec:
  selector:
    matchLabels:
      name: preload
  template:
    metadata:
      labels:
        name: preload
    spec:
      initContainers:
      {{range $idx, $image := .Images}}
      - name: preload-{{$idx}}
        image: gcr.io/k8s-testimages/perf-tests-util/containerd:v0.0.1
        command: ["sh", "-c", "ctr -n=k8s.io image pull {{$image}} 2>&1 | tee /var/log/cl2-image-preload-{{$idx}}.log"]
        volumeMounts:
        - name: containerd
          mountPath: /run/containerd
        - name: logs-volume
          mountPath: /var/log
      {{end}}
      volumes:
      - name: containerd
        hostPath:
          path: /run/containerd
      - name: logs-volume
        hostPath:
          path: /var/log
      containers:
      - name: pause
        image: gcr.io/google_containers/pause

Use containerd in image preloader
Use containerd in image preloader
