Skip to content

Nexus Helm chart and image mirroring

Standalone reference for how APISIX's chart/images and cert-manager's chart/images were mirrored into this project's private Nexus. Covers the actual commands used, the versions confirmed at mirror time, and a real incident hit along the way (architecture mismatch) and how it was fixed for good.


The correct, current method: docker buildx imagetools create

Use this for every image mirror, always — this is the final, correct method, not an intermediate step. It copies the image's manifest exactly as published at the source — including every architecture the source actually offers, as a genuine multi-platform manifest list — without ever needing to pick one architecture based on whatever machine happens to be running the mirror command.

docker buildx imagetools create \
  --tag "registry.nexus.castis.io/<destination-path>:<tag>" \
  "<source-image>:<tag>"

Before running any mirror command, log in to the destination:

docker login registry.nexus.castis.io


Real incident: an earlier method caused a production-breaking architecture mismatch

What happened. The very first mirroring pass used the older, more familiar docker pull → docker tag → docker push pattern, without an explicit --platform flag:

# The OLD, now-abandoned method -- do not use this pattern anymore
docker pull quay.io/jetstack/cert-manager-cainjector:v1.21.0
docker tag quay.io/jetstack/cert-manager-cainjector:v1.21.0 registry.nexus.castis.io/cert-manager/cainjector:v1.21.0
docker push registry.nexus.castis.io/cert-manager/cainjector:v1.21.0
docker pull without --platform defaults to whatever architecture the machine running the command happens to be — not the target VM's architecture. The mirroring machine was very likely ARM64 (e.g. an Apple Silicon Mac), while the actual k3s VM is confirmed x86_64/amd64 (uname -m). The mismatched image pulled and pushed to Nexus without any error — Docker doesn't validate architecture at pull/push time — so the problem stayed completely invisible until the pod actually tried to run on the VM:
exec /app/cmd/cainjector/cainjector: exec format error

First fix attempt — --platform linux/amd64 on the pull. This resolved the immediate crash (confirmed via docker inspect ... | grep -i architecture showing "Architecture": "amd64"), but it's a narrower fix than it looks: it forces one specific architecture, discarding any others the source image might offer. Fine functionally for a single-architecture VM, but not a genuine mirror of what upstream actually publishes.

Final fix — switched to imagetools create entirely, for the reason described in the section above: it doesn't need to know or care what architecture the mirroring machine is, since it never actually downloads/re-encodes the image at all — it copies the manifest list (and lets the destination registry store all referenced architecture-specific blobs), faithfully preserving whatever multi-platform structure genuinely exists at the source.


Confirmed: Nexus genuinely supports full multi-platform manifest lists

Before settling on imagetools create as the standard method, it was worth confirming Nexus wasn't itself the limiting factor (some registry configurations silently flatten manifest lists on push). Directly verified against the real quay.io source and the resulting Nexus copy, for all 5 cert-manager images (controller, cainjector, webhook, acmesolver, startupapicheck):

docker buildx imagetools inspect quay.io/jetstack/cert-manager-cainjector:v1.21.0
confirmed the source itself published 5 platforms: linux/amd64, linux/arm/v7, linux/arm64/v8, linux/ppc64le, linux/s390x — a genuine manifest.list.v2 structure, digest-for-digest.

docker buildx imagetools inspect registry.nexus.castis.io/cert-manager/cainjector:v1.21.0
confirmed, after mirroring with imagetools create, the Nexus copy carries the exact same 5 platforms, matching digests — a faithful, complete copy, not flattened. This settled it: Nexus itself was never the limitation; the earlier pull/tag/push method was.

Decision for this project: keep all platforms the source publishes, rather than filtering down to a subset (e.g. just amd64+arm64). Simpler to maintain — every image mirror uses the exact same command shape regardless of how many platforms a given source happens to publish, with no extra filtering logic needed. Since only the amd64 variant is ever actually pulled/run (the k3s VM's own architecture), the unused platforms cost nothing at runtime — they just sit in Nexus as additional stored blobs.


cert-manager — versions confirmed, actual commands used

Version confirmed at mirror time: v1.21.0, checked directly against cert-manager's GitHub release history (released 8 Jul), not assumed from an older cached version number.

CERT_MANAGER_VERSION="v1.21.0"
NEXUS_REGISTRY="registry.nexus.castis.io"

CERT_MANAGER_IMAGES=(
  "cert-manager-controller:controller"
  "cert-manager-cainjector:cainjector"
  "cert-manager-webhook:webhook"
  "cert-manager-acmesolver:acmesolver"
  "cert-manager-startupapicheck:startupapicheck"
)

for entry in "${CERT_MANAGER_IMAGES[@]}"; do
  src_name="${entry%%:*}"
  dest_name="${entry##*:}"
  docker buildx imagetools create \
    --tag "$NEXUS_REGISTRY/cert-manager/$dest_name:$CERT_MANAGER_VERSION" \
    "quay.io/jetstack/$src_name:$CERT_MANAGER_VERSION"
done

The Helm chart — separate system, separate hostname

The chart itself (a .tgz of YAML templates) is a completely different concern from the images above — fetched once by the helm CLI, not by containerd at pod-start time. Mirrored to a different Nexus hostname than the images:

helm pull oci://quay.io/jetstack/charts/cert-manager --version v1.21.0
helm push cert-manager-v1.21.0.tgz oci://nexus.castis.io/helm-hosted

nexus.castis.io (chart, classic HTTP Helm repo / OCI push) vs. registry.nexus.castis.io (images, Docker Registry API v2) — two genuinely separate Nexus repositories on two separate hostnames, confirmed directly rather than assumed to be the same server.

acmesolver — mirrored, but not referenced in cert-manager-values.yaml

Unlike the other four images, acmesolver has no static Helm values key — cert-manager's controller launches acmesolver pods dynamically at runtime, only when an ACME-type Issuer/ClusterIssuer actually needs to complete an HTTP-01/DNS-01 challenge. It's mirrored to Nexus for completeness (and in case ACME is ever actually used later), but since this project uses a private CA issuer (no ACME at all), it's never actually invoked. If ACME is ever needed in the future, the controller's --acme-http01-solver-image flag would need to be set explicitly to registry.nexus.castis.io/cert-manager/acmesolver:v1.21.0 — not a Helm values key, a controller CLI flag.

Confirming global.imagePullSecrets before relying on it

Rather than guess which values key controls pull credentials for this chart:

helm show values my-nexus/cert-manager --version v1.21.0 | grep -i -A2 imagePullSecrets
Confirmed a single match, under global:, expecting a flat array of secret name strings (e.g. - nexus-registry-secret) — not the native Kubernetes {name: ...} object format used directly in a pod spec.


APISIX — versions confirmed, actual commands used

Versions confirmed at mirror time, checked directly against each project's real release history, not assumed:

Component Public source Nexus destination Version
APISIX gateway docker.io/apache/apisix registry.nexus.castis.io/apisix/apisix 3.17.0-ubuntu (confirmed latest, released 2026-06-15)
Ingress controller docker.io/apache/apisix-ingress-controller registry.nexus.castis.io/apisix/ingress-controller 2.1.0 (confirmed latest, released 2026-06-01)
etcd docker.io/bitnamilegacy/etcd registry.nexus.castis.io/apisix/etcd 3.6.4-debian-12-r4 (confirmed latest tag in the frozen bitnamilegacy repo)
adc ghcr.io/api7/adc registry.nexus.castis.io/apisix/adc 0.26.0 (deliberately kept, not bumped — v0.28.0 was available at check time)
NEXUS_REGISTRY="registry.nexus.castis.io"

docker buildx imagetools create \
  --tag "$NEXUS_REGISTRY/apisix/apisix:3.17.0-ubuntu" \
  docker.io/apache/apisix:3.17.0-ubuntu

docker buildx imagetools create \
  --tag "$NEXUS_REGISTRY/apisix/ingress-controller:2.1.0" \
  docker.io/apache/apisix-ingress-controller:2.1.0

docker buildx imagetools create \
  --tag "$NEXUS_REGISTRY/apisix/etcd:3.6.4-debian-12-r4" \
  docker.io/bitnamilegacy/etcd:3.6.4-debian-12-r4

docker buildx imagetools create \
  --tag "$NEXUS_REGISTRY/apisix/adc:0.26.0" \
  ghcr.io/api7/adc:0.26.0

The Helm chart

helm repo add apisix https://charts.apiseven.com
helm repo update
helm pull apisix/apisix --version 2.15.0
curl -u helm:helm_upload \
  https://nexus.castis.io/repository/helm-hosted/ \
  --upload-file apisix-2.15.0.tgz
Verify:
curl -u helm:helm_upload https://nexus.castis.io/repository/helm-hosted/index.yaml

Why klipper-lb was deliberately NOT mirrored

klipper-lb (docker.io/rancher/klipper-lb) is the image behind the svclb-* pod k3s automatically creates for any LoadBalancer-type Service, including apisix-gateway. It's k3s's own built-in internal plumbing — installed automatically the moment a LoadBalancer Service exists, with zero manifest/config from this project, the same way coredns and local-path-provisioner are. This project's mirroring policy applies to things explicitly chosen to install (APISIX, cert-manager, postgres, etc.) — not to Kubernetes/k3s's own internal mechanisms, which aren't something a values file or Helm install can redirect anyway.

Confirming global.imagePullSecrets for this chart

helm show values apisix/apisix --version 2.15.0 | grep -n -i pullSecret
Confirmed a single match, under global:, same flat-string-array structure as cert-manager's chart.


Verifying a mirror after the fact

Two checks worth running after any mirror, before trusting it:

1. Confirm every platform copied correctly, matching the source:

docker buildx imagetools inspect <source-image>:<tag>
docker buildx imagetools inspect registry.nexus.castis.io/<destination-path>:<tag>
Compare the platform list and digests between the two — they should match exactly.

2. Confirm the amd64 variant specifically is genuinely amd64 (the actual thing that matters for this project's VM):

docker pull registry.nexus.castis.io/<destination-path>:<tag>
docker inspect registry.nexus.castis.io/<destination-path>:<tag> | grep -i architecture
Should show "Architecture": "amd64".