Offline Installations
Air-Gapped / Offline / VPC Clusters
If your cluster is air-gapped, within a VPC or restricts network connectivity in other ways, you may run into issues validating the Loft license and pulling Loft images required for Loft.
To solve the licensing issue, you can either use allow HTTP requests from the Loft pod(s) to
https://license.loft.sh/*
(this is the preferred option), or use an
offline license key.
To solve not being able ot pull images from Docker hub, you can use a private image registry to host your own copies of the Loft image that your cluster can reach.
Offline Images
If your cluster is not able to pull images from Docker Hub, you have to push the Loft images
into your private registry. To find out which images are required, we publish a file called
loft-images.txt
with each Loft release.
Follow these instructions to download all Loft ind import them to your private registry:
Set the
$VERSION
variable to the Loft version you want to upgrade to OR set it to the current version using:CHART=$(kubectl get service loft -n loft -o jsonpath={.metadata.labels.chart})
VERSION=${CHART:5}Set your private registry as variable:
REGISTRY=ecr.io/myteam # THIS SHOULD BE A PREFIX / DO NOT INCLUDE ANY LOFT_IMAGE PATHS
Download the file
loft-images.txt
and the required scripts calleddownload-images.sh
andupload-images.sh
:wget https://github.com/loft-sh/loft/releases/download/v${VERSION}/loft-images.txt
wget https://github.com/loft-sh/loft/releases/download/v${VERSION}/download-images.sh
wget https://github.com/loft-sh/loft/releases/download/v${VERSION}/upload-images.sh
chmod +x ./download-images.sh
./download-images.sh --image-list loft-images.txtMake scripts
download-images.sh
andpush-images.sh
executable:chmod +x ./download-images.sh
chmod +x ./push-images.shRun
download-images.sh
to download all images locally:./download-images.sh --image-list loft-images.txt
Run
push-images.sh
to push all downloaded images to your private registry:./push-images.sh --registry ${REGISTRY}
Edit your existing
loft.yaml
file or create a new file namedloft.yaml
with content:image=${REGISTRY}/loftsh/loft:${VERSION} # Replace ${REGISTRY} and ${VERSION}
env:
DEFAULT_IMAGE_REGISTRY: ${REGISTRY} # Replace ${REGISTRY}Upgrade Loft via:
- CLI
- helm
To upgrade Loft via Loft CLI, run:
loft start --upgrade --version=$VERSION --values=loft.yaml
To upgrade Loft via
helm
, run:helm upgrade loft loft -n loft --repository-config '' --repo https://charts.loft.sh \
--version $VERSION \
--reuse-values \
-f loft.yaml
Offline License Key
If your cluster does not allow the Loft pod to connect the Loft license server
(https://license.loft.sh/*
), you can contact sales@loft.sh to purchase
an offline license key or to request a trial license key for offline use.
You can edit Loft install values as follows to use your offline license key:
env:
LICENSE_KEY: "YOUR_LICENSE_KEY"