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.
- 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
| Environment | What is allowed | What changes for you |
|---|---|---|
| Connected | Outbound internet, maybe through a proxy | Normal installs, hosted APIs |
| Restricted / allowlisted | Outbound only to approved destinations | Firewall requests, mirrors for most dependencies |
| Private cloud / VPC | Access via private endpoints only | Private links to model and storage services, no public endpoints |
| Air-gapped | No network path to the outside at all | Everything 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.
- 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.
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 bundleGenerate 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.
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/chartsPoint 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.
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 nodesTools 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.
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.