Created
October 18, 2021 01:59
-
-
Save rhemz/7a9f0a015f81edadcf2309e68b0ce61f to your computer and use it in GitHub Desktop.
no container repo available?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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