Pull Images from Internet in a limited Internet Access Environment.

Problem

  • Unable to pull images from Internet(Eg. docker.io) in an environment having limited access to Internet.
  • Even after whitelisting docker.io in the proxy, the image pull fails with the below events. Example image shown here is _docker.io/library/nginx:latest_
Bash
Copy

Environment

  • Platform9 Managed Kubernetes
  • Platform9 Edge Cloud

Cause

  • Platform9 caches Images in _https://dockermirror.platform9.io_ for all the pulls done from docker.io . This registry mirror is to avoid rate-limiting from docker.io and for faster pulls.
  • If an environment with limited Internet access having docker.io whitelisted in the proxy, tries to pull the images, it will eventually fail as it will initially try to reach _https://dockermirror.platform9.io_ , which the environment would probably not have access to.

Resolution

  • Whitelist the URL _https://dockermirror.platform9.io_ in the proxy that the cluster is configured with.
  • In order for the container runtime to be aware of the proxy while pulling images, create a /etc/environment file on each node and add the below content in it
bash
Copy
  • Once the above is done, restart the Nodeletd phases in a rolling fashion
Bash
Copy
  • Try deploying a pod using image from docker.io
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard