Pulling Images from GCR repository on Local Workstation
This topic describes how to pull images from GCR repository on your local workstation using minikube single-node environment.
Prerequisites
- Install minikube. See minikube documentation.
- Start single node environment in minikube.
- Get
imagePullSecrets
of the private GCR repository. For Spark images, see imagePullSecrets file.
About this task
- Using minikube single-node environment
-
To pull the images from private GCR repository, you need
imagePullSecrets
and to useimagePullSecrets
, you need Kubernetes cluster. minikube runs a single-node Kubernetes cluster on your local workstation.
You can pull images from the GCR repository by executing the
download-images.sh
script. See download-image.sh script.
Procedure
-
Download images to the local workstation. To excecute
download-images.sh
script, run:./download-image.sh <complete-GCR-repo-path-to-image>
For example:./download-image.sh gcr.io/<repository-name>/spark-<version>:<image-tag>
-
Save and compress the downloaded image file as
tar
file.docker save -o <complete-GCR-repo-path-to-image> | gzip > <any-filename>.tar.gz
-
Copy the compressed
<any-filename>.tar.gz
to your desired destination location. -
Load the docker images from
.tar.gz
file in your destination location.docker load <any-filename>.tar.gz