highway-chart, pushes it to Docker Hub’s OCI registry, and then pulls and installs it from the registry. The examples use the Docker Hub username siddharth67; replace it with your own when running commands.
Ensure you are using Helm 3.x with OCI support. Helm 3.8+ includes built-in OCI support; some older 3.x releases required experimental flags or community plugins. Also confirm your Docker Hub credentials (password or Personal Access Token) before running
helm registry login.Prerequisites
- Helm 3.x installed and on your PATH.
- A Docker Hub account (or another OCI registry) and credentials.
- kubectl configured for your target cluster if you plan to install the chart.
1) Create and package a Helm chart
If you do not already have a chart, scaffold one:manifests/helm/highway-chart):
2) Authenticate to Docker Hub (OCI registry)
Log in to Docker Hub using Helm’s registry login. Replacesiddharth67 with your Docker Hub username:
Docker Hub may require a Personal Access Token instead of your account password depending on your account settings. If authentication fails, create a token in Docker Hub and use it as the password.
3) Push the packaged chart to Docker Hub (OCI)
When pushing a Helm chart as an OCI artifact, push it under your Docker Hub namespace. The destination format isoci://registry-1.docker.io/<your-username>.
Example:
oci://registry-1.docker.io/docker namespace will fail with 401 Unauthorized unless docker is your namespace. Always use your own username or organization namespace.
4) Pull the chart from Docker Hub (OCI)
You can pull the chart tarball from the OCI registry withhelm pull. Always include the chart name and version to avoid Helm attempting to list tags (which may require additional authentication):
5) Install the chart directly from the OCI registry
Helm can install charts directly from an OCI URL without first pulling a tarball. Example below creates a namespace and installs the chart using an explicit values file:6) Using OCI artifacts with GitOps tools
Many GitOps tools can use OCI registries as application sources for Helm charts.- Argo CD supports OCI as an application source and can fetch Helm charts from OCI registries: Argo CD GitOps course
- Flux CD supports an
OCIRepositorysource to track OCI artifacts: Flux CD GitOps course
OCIRepository and supply credentials when required.
Example Flux OCIRepository:
7) Quick reference — common Helm OCI commands
| Task | Command / Example |
|---|---|
| Package a chart | helm package ./path-to-chart |
| Login to registry | helm registry login registry-1.docker.io -u <username> |
| Push chart to OCI | helm push chart-0.1.0.tgz oci://registry-1.docker.io/<username> |
| Pull chart from OCI | helm pull oci://registry-1.docker.io/<username>/chart --version 0.1.0 |
| Install from OCI | helm install release oci://registry-1.docker.io/<username>/chart --version 0.1.0 -n <ns> |
8) Summary and best practices
- Use
helm packageto create chart tarballs andhelm pushto upload them as OCI artifacts. - Authenticate with
helm registry login. For Docker Hub, prefer a Personal Access Token if your account requires it. - Always push to your own Docker Hub namespace (for example,
oci://registry-1.docker.io/<your-username>). - Install charts directly from OCI with
helm installto avoid manual tarball handling. - For GitOps automation, configure Argo CD or Flux to read from OCI registries and provide registry credentials via Kubernetes Secrets when registries are private.
- Automate credential rotation and secret management for production pipelines to reduce risk.