Deploying to Air-Gapped Environments
1. Downloading Charts for Offline Use
Example: Pull chart + deps
helm pull bitnami/postgresql --version 15.3.0
helm pull bitnami/postgresql --untar # Extract to ./postgresql/
helm pull oci://ghcr.io/acme/charts/api --version 1.4.2
2. Bundling Chart Dependencies
Example: Vendor all deps
helm dependency update ./mychart # populates charts/
tar czf mychart-bundle.tgz mychart/
3. Mirroring Container Images
Example: Use skopeo / crane
# Extract image list from chart
helm template ./chart | grep 'image:' | awk '{print $2}' | sort -u
# Mirror with skopeo
skopeo copy docker://nginx:1.27 docker://registry.internal/nginx:1.27
# Or crane
crane copy nginx:1.27 registry.internal/nginx:1.27
4. Setting Up Private Registry
| Option | Use |
|---|---|
| Harbor | Full-featured with Helm OCI + image scanning |
| ChartMuseum | Lightweight HTTP chart repo |
| Distribution | Reference OCI registry implementation |
| JFrog Artifactory | Enterprise multi-format |
5. Configuring Air-Gapped Repository
Example: Internal repo + OCI
helm repo add internal https://charts.internal/stable
helm registry login oci://registry.internal
helm push api-1.4.2.tgz oci://registry.internal/charts
6. Updating Image References
Example: Override registries
# values-airgap.yaml
global:
imageRegistry: registry.internal
image:
repository: acme/api
tag: "1.4.2"
postgresql:
image:
registry: registry.internal
repository: bitnami/postgresql
7. Packaging All Dependencies
| Asset | Bundling tool |
|---|---|
| Charts | helm pull + tarball |
| Images | docker save or skopeo sync |
| Plugins | Vendor plugin source in offline bundle |
| One-shot | Tools like Carvel imgpkg or Rancher hauler |
8. Validating Offline Installation
Example: Dry-run + render check
helm install api ./chart -f values-airgap.yaml --dry-run
helm template api ./chart -f values-airgap.yaml | grep 'image:' | grep -v registry.internal
# Expect zero output — all images should reference internal registry
9. Managing Updates in Air-Gapped
| Workflow | Step |
|---|---|
| 1. Stage in connected env | Pull new chart + images |
| 2. Transfer | Physical media / one-way diode |
| 3. Import | Push to internal registry + chart repo |
| 4. Verify signatures | helm verify + cosign |
| 5. Deploy | Standard helm upgrade |