I want to pull the images beforehand and then install kubeadm on my host. Currently my network blocks gcr.io. So can i pull the images beforehand and then connect my host to corporate network for the install?
-
Your network blocks HTTP traffic to gcr.io? That seems really weird. It should be just a normal HTTP protocol. – WedTM Aug 04 '17 at 12:52
-
1_It should be just a normal HTTP_ well, strictly speaking `docker pull` is usually over https, which I can imagine a corporate network fiddling with in a way that makes docker unhappy – mdaniel Aug 05 '17 at 05:54
1 Answers
It's hard to provide the perfect generic answer to your question without knowing more of the tradeoffs you are willing to endure, but the tl;dr may be:
# on a host with access:
docker pull gcr.io/google_containers/hyperkube:v1.7.3
docker save -o gcr.io_google_containers_hyperkube_v1.7.3.tar gcr.io/google_containers/hyperkube:v1.7.3
# then, on the machine where you are unable to docker pull::
curl -vo hyperkube.tar http://example.com/gcr.io_google_containers_hyperkube_v1.7.3.tar
docker load -i hyperkube.tar
You may be able to curl | docker load
but I have experienced a lot more success using the on-disk tar than the piped method. I also periodically experience that docker load
does as I asked, but does not retain the "tag," meaning you will need a subsequent docker tag 55d97676fd42 gcr.io/google_containers/hyperkube:v1.7.3
to be back in business
When I spoke about "the tradeoffs," another solution that may work better for you is to run your own docker registry (it's super easy with their docker image), then download the image as above but then push it into your local registry (where hopefully you will experience less blocking)
Finally, you may find the offline bare metal section informative, even if it's not strictly speaking what you asked

- 31,240
- 5
- 55
- 58