Skip to content

Instantly share code, notes, and snippets.

@rhemz
Created October 18, 2021 01:59
Show Gist options
  • Save rhemz/7a9f0a015f81edadcf2309e68b0ce61f to your computer and use it in GitHub Desktop.
Save rhemz/7a9f0a015f81edadcf2309e68b0ce61f to your computer and use it in GitHub Desktop.
no container repo available?
apiVersion: v1
kind: Pod
metadata:
name: pod-from-tarball
spec:
initContainers:
- name: doit
image: docker.io/library/docker:dind
command:
- sh
- -exc
- |
docker load -i /host/tmp/some-image.tar
docker tag podfromtar podfromtar12345
securityContext:
privileged: true
volumeMounts:
- name: tmp
mountPath: /host/tmp
- name: vr
mountPath: /var/run
containers:
- name: podfromtar
# this image does not even exist when the Pod is scheduled
image: podfromtar12345
# important
imagePullPolicy: Never
restartPolicy: Never
volumes:
- name: tmp
hostPath:
path: /tmp
- name: vr
hostPath:
path: /var/run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment