Limited Internet Access
Kubernetes pulls images from the network according to the ImagePullPolicy which is set to IfNotPresent for the Kloudspot application containers.
The rule works as follows:
- If the image tag is not ’latest’ then the image is only pulled if it is not already present locally.
- If the image is ’latest’ then the image will always be pulled.
So don’t set a tag to ’latest’ for an offline installation!
Docker Registry Access needed:
By default, the following URLs need to be accessible in order allow images to be loaded. If this is not possible, then you will have to sideload the images.
Side Loading Images
The easiest way to sideload images is as follows:
- Set up a system with all of the required images and run the following command:
microk8s images export-local > images.tgz
-
Copy the file
images.tar
to the off-line system. -
Then on the offline system, run the following command:
microk8s images import < images.tgz
Once, the images are loaded, you can limit garbage collection by running the following script to add a ’label’ to the images.
/opt/kloudspot/bin/label-images