4 How do I air-gap Ollama and blueprints? #
Learn how to mirror artifacts, container images and Ollama models to deploy blueprints in an air-gapped environment.
4.1 Placeholders used in this topic #
The following placeholders are used throughout this topic:
| Placeholder | Meaning |
|---|---|
| The fully qualified domain name (FQDN) or IP address of your private registry inside the air gap |
| The blueprint custom resource (CR) file that you want to deploy |
| The Kubernetes namespace where the blueprint workload is deployed |
| The Helm chart name or chart version retrieved from the blueprint inventory |
| The container image name and tag retrieved from the blueprint inventory |
| An Ollama model identifier, such as |
4.2 Blueprint architecture #
A blueprint depends on three types of artifacts:
| Artifact | Referenced by | Air-gap approach |
|---|---|---|
Helm charts |
| Mirror to a private OCI registry and update the repository in › . |
Container images |
| Mirror one-to-one and resolve through RKE2 registry mirrors. |
Ollama models |
| Pre-pull, copy into a persistent volume claim (PVC) and disable |
Each artifact category requires a specific air-gap approach:
Helm charts are resolved through Rancher Prime
ClusterReporesources by repository identity rather than hardcoded URLs.Container images are pulled by containerd on each node and redirected to your private registry through mirror configurations.
Ollama models are fetched dynamically at startup through Ollama’s model registry protocol rather than an OCI registry. In an air-gapped cluster, you must pre-populate models into a Kubernetes PersistentVolumeClaim (PVC)—a shared storage volume configured with ReadWriteMany (RWX) access—so that Ollama pods can load model weights locally from disk.
4.3 Prerequisites #
The requirements for air-gapped deployments apply:
A connected staging host with Helm, Docker or Podman (or regsync, Skopeo, crane),
yqand Ollama.An OCI registry inside the air gap (for example, Harbor) with a TLS certificate issued by your organization’s CA.
ReadWriteMany (RWX) storage (such as Longhorn or NFS) for the model cache.
4.4 Identifying blueprint artifacts #
> CR=<BLUEPRINT>.yaml
# Helm charts
> yq '.. | select(has("chartName")) | [.chartName, .chartRepo, .chartVersion] | join(" ")' $CR
# Images set in values
> yq '.. | select(has("repository") and has("registry")) | .registry + "/" + .repository + ":" + .tag' $CR
> grep -oE 'image: *"?[a-z0-9.-]+\.[a-z]+/[^ "]+' $CR | sort -u
# Ollama models
> yq '.. | select(has("chartName") and .chartName == "ollama") | .values.ollama.models' $CRCharts may also pull container images that only appear in chart defaults and are not explicitly listed in the blueprint custom resource.
To discover all images that a chart deploys, extract the component’s values block from <BLUEPRINT>.yaml into a local values.yaml file, then render the chart templates:
> yq '.spec.components[] | select(.chartName == "<CHART>") | .values' $CR > values.yaml
> helm template <CHART> --version <CHART_VERSION> -f values.yaml | grep image:Be sure to account for images from registries other than SUSE (such as docker.io, ghcr.io or mcr.microsoft.com).
Pin any :latest or moving tag to a fixed version or digest before mirroring.
4.5 Downloading artifacts on the connected host #
> helm registry login dp.apps.rancher.io
> helm pull oci://dp.apps.rancher.io/charts/<CHART> --version <CHART_VERSION>
> docker login dp.apps.rancher.io
> docker pull dp.apps.rancher.io/containers/<IMAGE>:<TAG>
> docker save dp.apps.rancher.io/containers/<IMAGE>:<TAG> -o <IMAGE>.tarRepeat this process for every chart and image identified in the inventory.
For SUSE AI components, the SUSE-AI-get-images.sh and SUSE-AI-load-images.sh scripts from the SUSE AI air-gapped repository automate this task.
4.6 Downloading Ollama models #
# Repeat for each model
> ollama pull <MODEL>
# Archive models/blobs and models/manifests
> tar -C ~/.ollama -czf ollama-models.tgz models4.7 Transferring and uploading artifacts #
Transfer the downloaded Helm chart packages, container image archives, and ollama-models.tgz across the air gap using rsync, secure copy (scp), or approved physical media.
After transferring the files, push the Helm charts and container images to your local private registry.
Retain the upstream repository path structure so that rewrite rules in your cluster registry configuration can resolve them seamlessly.
Optionally, prepend a per-source namespace prefix, such as suse-app-co/, to organize images from different upstream registries:
> helm push <CHART>-<CHART_VERSION>.tgz oci://my.local.registry.com/suse-app-co/charts
> docker load -i <IMAGE>.tar
> docker tag dp.apps.rancher.io/containers/<IMAGE>:<TAG> \
my.local.registry.com/suse-app-co/containers/<IMAGE>:<TAG>
> docker push my.local.registry.com/suse-app-co/containers/<IMAGE>:<TAG>4.8 Pointing chart repositories at the mirror #
In the Rancher Prime UI, navigate to › .
Set the SUSE Application Collection and SUSE Registry endpoints to your mirror (for example, `oci://my.local.registry.com/suse-app-co/charts`).
Select the CA secret from the
aif-operatornamespace, and click .
Because blueprints reference chart repositories by identity (chartRepo name) rather than by direct URL, you do not need to modify the custom resource for charts.
If your blueprint references an additional Rancher Prime ClusterRepo resource outside the default SUSE collections, create or update that ClusterRepo with the same name, pointing its spec.url to the mirrored chart repository in your local registry.
4.9 Configuring RKE2 private registries #
Container image references defined within blueprint values blocks remain unchanged and point to their upstream registry URLs. Because the air-gapped cluster cannot reach external registries, the container runtime (containerd) must redirect image pull requests to your private mirror.
On every server and agent node in the cluster, create or update /etc/rancher/rke2/registries.yaml (for details, see the RKE2 private registry documentation). Define a mirror entry and rewrite rule for each source registry referenced by your blueprint components:
mirrors:
dp.apps.rancher.io:
endpoint: ["https://my.local.registry.com"]
rewrite:
"^(.*)$": "suse-app-co/$1"
registry.suse.com:
endpoint: ["https://my.local.registry.com"]
rewrite:
"^(.*)$": "suse-registry/$1"
docker.io:
endpoint: ["https://my.local.registry.com"]
rewrite:
"^(.*)$": "docker/$1"
configs:
my.local.registry.com:
tls:
ca_file: /etc/rancher/rke2/my-ca.pemAfter creating or updating the configuration, restart RKE2 on the node:
# systemctl restart rke2-serverOn worker nodes, run:
# systemctl restart rke2-agent4.10 Loading Ollama models into a PVC #
The Ollama component requires local access to model weights and metadata in a persistent volume. Because an air-gapped environment prevents dynamic model downloads from the public Ollama registry (registry.ollama.ai), you must pre-populate the models into an RWX PVC.
Create an RWX PVC in <NAMESPACE>, then copy and unpack the archived models into the volume using a temporary loader pod:
Save the following manifest as
ollama-models.yaml:apiVersion: v1 kind: PersistentVolumeClaim metadata: name: ollama-models spec: accessModes: [ReadWriteMany] resources: requests: storage: 20Gi # size for your models --- apiVersion: v1 kind: Pod metadata: name: ollama-loader spec: restartPolicy: Never containers: - name: loader image: dp.apps.rancher.io/containers/ollama:<TAG> # already mirrored command: ["sleep", "infinity"] volumeMounts: - name: data mountPath: /data volumes: - name: data persistentVolumeClaim: claimName: ollama-modelsApply the manifest, copy the archive and unpack the models:
> kubectl -n <NAMESPACE> apply -f ollama-models.yaml > kubectl -n <NAMESPACE> cp ollama-models.tgz ollama-loader:/data/ > kubectl -n <NAMESPACE> exec ollama-loader -- tar -C /data -xzf /data/ollama-models.tgz > kubectl -n <NAMESPACE> exec ollama-loader -- rm /data/ollama-models.tgz > kubectl -n <NAMESPACE> delete pod ollama-loader
The Ollama container mounts the model volume at /root/.ollama by default. When unpacking the archive into /data, ensure that the models/ directory resides directly at the root of the mounted volume, matching the path /root/.ollama/models.
4.11 Configuring the Ollama component to use the PVC #
Connecting the pre-loaded PVC and disabling online model retrieval is the only modification required in the blueprint custom resource.
In the values section of the ollama component in <BLUEPRINT>.yaml, set models.pull to an empty list ([]) to prevent startup network calls, define the models to load under models.run, and configure persistentVolume to reference the existing PVC:
ollama:
models:
pull: [] # registry.ollama.ai is unreachable
run:
- <MODEL> # must already be in the PVC
persistentVolume:
enabled: true
existingClaim: ollama-models4.12 Applying and verifying the deployment #
Apply the blueprint and verify the Ollama deployment:
> kubectl apply -f <BLUEPRINT>.yaml
> kubectl -n <NAMESPACE> get pods
> kubectl -n <NAMESPACE> describe pod -l app.kubernetes.io/name=ollama | grep -i image
> kubectl -n <NAMESPACE> exec deploy/ollama -- ollama list4.13 Considerations #
Keep the following considerations in mind when planning and deploying in an air-gapped environment:
Verify that all models in
runexist in the volume cache. If an Ollama pod starts and a model listed underollama.models.runis missing from the volume cache, Ollama attempts to download it from the internet, which causes network timeouts and leaves the pod in an unhealthy or hanging state.Account for build-time and runtime package downloads in DAGs and custom images. Blueprints often include workflow orchestrators like Apache Airflow, where data pipelines and AI workloads are defined as Directed Acyclic Graphs (DAGs). If DAG tasks or container entry points run dynamic package installations (such as
pip installornpm install), they fail because external package registries are unreachable in an air-gapped network. To address this:Package all required third-party dependencies into customized container images before transferring them to the air-gapped registry.
Deploy an internal package repository mirror (such as a private PyPI or npm server) if dynamic dependencies are required at runtime.
If the workflow orchestrator synchronizes DAGs using
git-sync, ensure the Git repository URL points to an internal Git server accessible within the air gap.
Avoid moving tags. Tags such as
:latestcannot be verified or updated reliably across an air gap. Always pin images and Helm chart dependencies to specific semantic versions or immutable cryptographic digests before mirroring.