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

  1. Install minikube. See minikube documentation.
  2. Start single node environment in minikube.
  3. 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 use imagePullSecrets, 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

  1. 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>
  2. Save and compress the downloaded image file as tar file.
    docker save -o <complete-GCR-repo-path-to-image> | gzip > <any-filename>.tar.gz
  3. Copy the compressed <any-filename>.tar.gz to your desired destination location.
  4. Load the docker images from .tar.gz file in your destination location.
    docker load <any-filename>.tar.gz