Education › Forward Deployed › Stage 4: Deploying in customer environments

On-prem, private cloud and air-gapped deployments

Mirroring images and charts, offline installs, private endpoints, self-hosted models and upgrades with no internet.

Intermediate to advanced ~45 min read Module 14 of 20

Banks, hospitals, defence, government and critical-infrastructure customers often run software where nothing may reach the internet. In an air-gapped or tightly restricted environment there is no docker pull, no pip install, no hosted model API and no quick fix from your laptop. Every artefact must be carried in, verified and installed offline, and every upgrade repeated the same way. This lesson covers the spectrum from restricted VPCs to true air gaps, building a complete offline bundle, mirroring images and charts into the customer's registry, installing Kubernetes and your application offline, serving models without internet, and upgrading safely.

After this module you can
  • Distinguish connected, restricted, private-cloud and fully air-gapped environments
  • Build an offline bundle containing every image, chart, model and dependency
  • Mirror images and Helm charts into a customer registry and point workloads at it
  • Install Kubernetes and an application without internet access
  • Plan offline model serving, licensing, updates and support

The spectrum of isolation

EnvironmentWhat is allowedWhat changes for you
ConnectedOutbound internet, maybe through a proxyNormal installs, hosted APIs
Restricted / allowlistedOutbound only to approved destinationsFirewall requests, mirrors for most dependencies
Private cloud / VPCAccess via private endpoints onlyPrivate links to model and storage services, no public endpoints
Air-gappedNo network path to the outside at allEverything carried in on approved media and verified

Clarify early which one you face, and whether it differs between environments (development may be connected, production air-gapped). The answer reshapes the architecture: hosted model APIs become self-hosted models, telemetry becomes local, licence checks must work offline, and support moves from live access to support bundles carried out through the same approval process.

Build a complete offline bundle

The core discipline is a bill of materials for the whole installation and a repeatable process that turns it into one verifiable bundle on a connected machine. Anything you forget will be discovered on the inside, where you cannot fetch it.

CONNECTEDAIR-GAPPEDbundlecarry inpushpull only hereBuild bundleimages, charts, modelSHA256SUMSsignedTransfermedia / diodeVerifychecksumsInner registryClustermirror config
Air-gapped delivery: everything is bundled and checksummed on the connected side, carried across, verified, mirrored into the internal registry, and installed with nothing reaching out.
  • Container images: every image your charts reference, including init containers, sidecars and the images of any dependencies you install (databases, ingress, monitoring).
  • Helm charts at pinned versions, plus the values files.
  • Kubernetes distribution artefacts if you install the cluster too: binaries, its own images, install scripts.
  • Model weights and tokenizer files for self-hosted models, and the inference engine image.
  • OS and language packages if you install anything on hosts (often avoided by using images only).
  • Checksums, signatures and SBOMs for everything, and the documentation and installation script.
On the connected side: export images and charts into a bundle
bash
mkdir -p bundle/images bundle/charts
while read -r img; do
  name=$(echo "$img" | tr '/:' '__')
  skopeo copy --all "docker://$img" "oci-archive:bundle/images/$name.tar:$img"
done < images.txt

helm pull oci://registry.yourproduct.example/charts/assistant --version 1.8.2 -d bundle/charts
(cd bundle && find . -type f ! -name SHA256SUMS -exec sha256sum {} \; > SHA256SUMS)
tar -czf assistant-1.8.2-offline.tar.gz bundle
Tip

Generate images.txt from the rendered chart (helm template ... | grep 'image:') rather than by hand, and test the bundle by installing it into a cluster with outbound traffic blocked before it ever reaches the customer.

Mirror into the customer's registry

Inside the gap, the customer usually runs a registry (Harbor, Artifactory, Nexus, a cloud private registry). Push every image and chart into it after verifying checksums, then configure workloads and the cluster runtime to pull only from there.

On the inside: verify, then push images and the chart to the internal registry
bash
sha256sum -c SHA256SUMS
for f in images/*.tar; do
  ref=$(skopeo inspect "oci-archive:$f" | jq -r '.Name')
  skopeo copy --all "oci-archive:$f" "docker://registry.corp.internal/mirror/${ref#*/}"
done
helm push charts/assistant-1.8.2.tgz oci://registry.corp.internal/charts

Point the chart at the mirror with image.registry and an imagePullSecret. For the cluster itself, container runtimes support registry mirrors so that references to public registries are transparently served from the internal one; with k3s this is the registries.yaml file, with other distributions the containerd mirror configuration. Mirroring public names avoids editing every manifest that references them.

Installing Kubernetes and the app offline

Often the customer provides the cluster. When you must install one, choose a distribution with a documented air-gap path. k3s, for example, ships an images archive that you place on each node and an install script that can skip downloading.

k3s air-gapped server install (artefacts copied in beforehand)
bash
sudo mkdir -p /var/lib/rancher/k3s/agent/images/
sudo cp k3s-airgap-images-amd64.tar.zst /var/lib/rancher/k3s/agent/images/
sudo install -m 0755 k3s /usr/local/bin/k3s
sudo mkdir -p /etc/rancher/k3s && sudo cp registries.yaml /etc/rancher/k3s/
INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh
sudo k3s kubectl get nodes

Tools built for this problem package the whole thing. Zarf, an open-source air-gap package manager for Kubernetes, declares images, charts, manifests and files in a zarf.yaml, builds a single compressed package on the connected side (zarf package create), and on the inside initialises an in-cluster registry (zarf init) and deploys the package (zarf package deploy), rewriting image references automatically. Evaluate it before writing your own bundle scripts.

Models, licences, updates and support

  • Models: hosted APIs are unavailable, so serve open-weight models inside with vLLM or a similar engine; carry weights in the bundle, size GPUs with the inference track's arithmetic, and set the engine to offline mode (for Hugging Face tooling, HF_HUB_OFFLINE=1).
  • Licences: licence checks must work offline, typically with a signed licence file verified locally.
  • Updates: each release is a new bundle with release notes, checksums and a tested upgrade path; never patch inside by hand. Security updates for base images need a cadence the customer agrees to.
  • Time and certificates: internal NTP and an internal CA; certificate expiry inside a gap is a classic outage.
  • Support: you will not get live access. Ship a support-bundle command that collects logs, configuration (secrets redacted) and versions into an archive the customer can review and send out through their approved channel.
Watch out

Do not plan to 'just connect it for the install'. Air-gap policies exist for regulatory and security reasons; an exception request can take months and may never be granted.

Hands-on practice

Install into a simulated air gap

  1. Create a VM (or a kind cluster in a Docker network) with outbound internet blocked by firewall rules, plus a local registry container reachable only from inside.
  2. On a connected machine, render your chart, extract the image list, and build an offline bundle with skopeo and helm pull, including checksums.
  3. Transfer the bundle into the isolated environment, verify checksums, and push images and the chart into the internal registry.
  4. Install the chart pointing image.registry at the mirror and confirm no pod tries to reach the internet (check events for pull errors).
  5. Build version 1.8.3 as a new bundle and perform an offline upgrade with helm upgrade --atomic.
  6. Optionally repeat the exercise with Zarf and compare the effort.
Cheat sheet

On-prem, private cloud and air-gapped deployments — at a glance

Main things to focus on

  • Find out exactly how isolated each environment is, early.
  • A bill of materials and one verifiable bundle per release.
  • Mirror every image and chart into the customer registry; pull only from there.
  • Test the bundle in a blocked-network cluster before delivery.
  • Self-host models; offline licences; internal NTP and CA.
  • Support via redacted support bundles, not live access.

Bundle

helm template ... | grep image:Derive the image list
skopeo copy --all docker://IMG oci-archive:F.tar:IMGExport an image
helm pull oci://REG/charts/C --version VFetch a pinned chart
sha256sum ... > SHA256SUMS / sha256sum -cCreate and verify checksums

Inside the gap

skopeo copy --all oci-archive:F.tar docker://MIRROR/IMGPush to internal registry
helm push CHART.tgz oci://MIRROR/chartsPush chart
image.registry + imagePullSecretsPoint workloads at the mirror
/etc/rancher/k3s/registries.yamlk3s registry mirror config

k3s offline install

/var/lib/rancher/k3s/agent/images/Place the airgap images archive
INSTALL_K3S_SKIP_DOWNLOAD=true ./install.shInstall without downloading
k3s kubectl get nodesVerify
HF_HUB_OFFLINE=1Hugging Face tooling: never try to download

Zarf

zarf package create .Build package from zarf.yaml
zarf initSet up in-cluster registry and tooling
zarf package deploy PACKAGE.tar.zstDeploy offline

Common pitfalls

  • Forgetting init-container, sidecar or dependency images in the bundle.
  • Assuming a temporary internet exception will be granted for the install.
  • Hosted model APIs or online licence checks in an air-gapped design.
  • Patching inside the gap by hand instead of shipping a new bundle.
  • No internal NTP or CA plan, then certificates expire silently.
Quiz

Check your understanding

5 questions · 4 to pass · answers are explained as you go. Your best score is saved on this device only.

Progress and quiz scores are saved in this browser only. Back up or restore on the hub.

Was this lesson useful? Tell me what to improve →