OCI Registries & Chart Repositories
A chart that only exists in a Git repository can't be installed by version, pinned in a dependency, or pulled by a GitOps tool without cloning. Publishing makes it a versioned artifact. Helm supports two kinds of storage: OCI registries (the same registries that store container images) and classic chart repositories (an index.yaml plus .tgz files over HTTP). OCI is the modern default.
Push, pull and inspect
The image for this course runs a local registry on localhost:5000 without TLS, so commands carry --plain-http; a real registry uses HTTPS and doesn't need it.
mkdir -p linkly/templates
printf 'apiVersion: v2\nname: linkly\nversion: 0.9.0\nappVersion: "1.4.1"\n' > linkly/Chart.yaml
printf 'replicaCount: 2\n' > linkly/values.yaml
cat > linkly/templates/configmap.yaml <<'EOF'
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-config
data:
replicas: {{ .Values.replicaCount | quote }}
EOF
helm package linkly
helm push linkly-0.9.0.tgz oci://localhost:5000/charts --plain-http
echo "--- consumers need no checkout:"
helm show values oci://localhost:5000/charts/linkly --version 0.9.0 --plain-http 2>/dev/null
helm template web oci://localhost:5000/charts/linkly --version 0.9.0 --plain-http --set replicaCount=3 2>/dev/null | tail -2
mkdir vendor && helm pull oci://localhost:5000/charts/linkly --version 0.9.0 --plain-http --untar -d vendor 2>/dev/null
find vendor -type f | sortSuccessfully packaged chart and saved it to: /home/learner/linkly-0.9.0.tgz
Pushed: localhost:5000/charts/linkly:0.9.0
Digest: sha256:e3d1eea69c5441aa376c1598c6587f821b98186b07a3222154de41aee6097021
--- consumers need no checkout:
replicaCount: 2
data:
replicas: "3"
Pulled: localhost:5000/charts/linkly:0.9.0
Digest: sha256:e3d1eea69c5441aa376c1598c6587f821b98186b07a3222154de41aee6097021
vendor/linkly/Chart.yaml
vendor/linkly/templates/configmap.yaml
vendor/linkly/values.yaml
Rules of the road:
- The reference is
oci://<registry>/<path>without the chart name on push (Helm appends it fromChart.yaml), and with it on pull, show, template and install:oci://localhost:5000/charts/linkly. - The chart version becomes the tag (
linkly:0.9.0). Charts and images can share a registry, so keep them apart by path:ghcr.io/acme/charts/linklyvsghcr.io/acme/linkly. helm repo addis not used for OCI: there is no index to download, every command takes the full reference.
What is stored
A chart in a registry is an OCI artifact with Helm's own media types, so registries, scanners and signing tools treat it like an image with a different payload:
mkdir -p linkly/templates
printf 'apiVersion: v2\nname: linkly\nversion: 0.9.0\n' > linkly/Chart.yaml
printf 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: x\n' > linkly/templates/cm.yaml
helm package linkly >/dev/null && helm push linkly-0.9.0.tgz oci://localhost:5000/charts --plain-http 2>/dev/null
curl -s -H 'Accept: application/vnd.oci.image.manifest.v1+json' \
http://localhost:5000/v2/charts/linkly/manifests/0.9.0 | jq '{config: .config.mediaType, layers: [.layers[].mediaType], annotations}'Pushed: localhost:5000/charts/linkly:0.9.0
Digest: sha256:0d78c4e01fbd414e6ee8609f9fbe634d0a8f69b997588029a0eae58147c9b5f2
{
"config": "application/vnd.cncf.helm.config.v1+json",
"layers": [
"application/vnd.cncf.helm.chart.content.v1.tar+gzip"
],
"annotations": {
"org.opencontainers.image.created": "2026-10-27T08:02:48Z",
"org.opencontainers.image.title": "linkly",
"org.opencontainers.image.version": "0.9.0"
}
}
The config blob holds Chart.yaml as JSON; the single layer is the .tgz. Because it's a normal OCI artifact you can copy charts between registries with crane/oras, scan them, and sign them with cosign exactly like images (Supply Chain Security).
Pinning by digest
Tags in most registries can be overwritten; a digest can't. Helm 4 installs by digest and refuses a chart whose content doesn't match:
mkdir -p linkly/templates
printf 'apiVersion: v2\nname: linkly\nversion: 0.9.0\n' > linkly/Chart.yaml
printf 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: x\n' > linkly/templates/cm.yaml
helm package linkly >/dev/null
digest=$(helm push linkly-0.9.0.tgz oci://localhost:5000/charts --plain-http 2>&1 | sed -n 's/^Digest: //p')
helm show chart "oci://localhost:5000/charts/linkly@$digest" --plain-http 2>/dev/null
echo "--- a digest that isn't in the registry:"
helm show chart "oci://localhost:5000/charts/linkly@sha256:$(printf '0%.0s' $(seq 64))" --plain-http 2>&1apiVersion: v2
name: linkly
version: 0.9.0
--- a digest that isn't in the registry:
Error: failed to perform "FetchReference" on source: localhost:5000/charts/linkly@sha256:0000000000000000000000000000000000000000000000000000000000000000: not found
GitOps tools and production pipelines should reference charts by digest (or at least by an exact version in a registry with immutable tags).
Authentication
Real registries need a login. Helm stores credentials in ~/.config/helm/registry/config.json and also reads Docker's credential helpers. In Helm 4 helm registry login takes a hostname only:
echo "$GITHUB_TOKEN" | helm registry login ghcr.io -u "$GITHUB_ACTOR" --password-stdin
helm push linkly-0.9.0.tgz oci://ghcr.io/acme/charts| Registry | Login |
|---|---|
| GitHub (GHCR) | a token with write:packages, or GITHUB_TOKEN in Actions |
| AWS ECR | aws ecr get-login-password | helm registry login --username AWS --password-stdin <account>.dkr.ecr.<region>.amazonaws.com (create the repository charts/linkly first) |
| Azure ACR | az acr login or a token; Helm reads the Docker credentials |
| Google Artifact Registry | gcloud auth print-access-token | helm registry login -u oauth2accesstoken --password-stdin <region>-docker.pkg.dev |
| Harbor, GitLab, Docker Hub, JFrog, Nexus | username + token |
In CI, prefer short-lived credentials from OIDC federation over long-lived tokens (Release Engineering: GitHub Actions security).
Classic chart repositories
Before OCI support, charts were published as files on any web server, with an index.yaml listing every version. Many public projects still publish this way (often on GitHub Pages), so you will meet them:
mkdir -p linkly/templates repo
printf 'apiVersion: v2\nname: linkly\nversion: 0.9.0\nappVersion: "1.4.1"\n' > linkly/Chart.yaml
printf 'apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: x\n' > linkly/templates/cm.yaml
helm package linkly -d repo >/dev/null
helm package linkly --version 0.9.1 -d repo >/dev/null
helm repo index repo --url https://charts.example.com/linkly
yq '.entries.linkly[] | .version + " " + .urls[0]' repo/index.yaml0.9.1 https://charts.example.com/linkly/linkly-0.9.1.tgz
0.9.0 https://charts.example.com/linkly/linkly-0.9.0.tgz
Upload repo/ to any static host and users run (a sample, it needs the network):
helm repo add acme https://charts.example.com/linkly
helm repo update
helm search repo acme/linkly --versions
helm install web acme/linkly --version 0.9.1Classic repositories have real drawbacks: the whole index.yaml is downloaded on every helm repo update and grows with every version, helm repo index --merge must be run carefully so old versions aren't lost, and access control is whatever the web server offers. For your own charts, use OCI.
Test yourself
Which reference do you pass to helm push linkly-0.9.0.tgz …?
- oci://registry.example.com/charts/linkly:0.9.0
- oci://registry.example.com/charts
- https://registry.example.com/charts/index.yaml
- registry.example.com/linkly
Why pin a chart by digest in production?
- Digests are shorter than versions
- A tag can be overwritten in many registries; a digest always identifies the same bytes
- Helm can't pull by tag
- Digests skip authentication
What does helm repo add do for an OCI registry?
- Downloads the index
- Nothing useful: OCI registries are referenced directly with oci:// URLs
- Logs in
- Mirrors every chart