Deploy/Upgrade from an OCI-hosted Helm Chart
This guide shows a practical CD path where your Helm chart is already pushed to an OCI registry (e.g., Harbor).
You'll use a Tekton Pipeline to pull/install that chart into your Kubernetes cluster.
You'll Build a reusable Pipeline named helm-oci-deploy that:
- Authenticates to your OCI registry
- Runs
helm upgrade --installdirectly from the OCI chart reference - Optionally applies extra values files and
--setoverrides - Works with a Kubeconfig secret or a ServiceAccount
TOC
PrerequisitesStep-by-Step InstructionsStep 1: Create the Registry Credential SecretStep 2: Create Cluster Access CredentialStep 3: Prepare helm imageStep 4: Define the PipelineStep 5: Run It with a PipelineRunTroubleshootingNext StepsPrerequisites
- A Kubernetes cluster (you can use minikube for local testing).
- Tekton Pipelines installed on your cluster.
- A Helm 3.8+ container image (Helm v3 with OCI support).
- An OCI registry with the OCI chart reference and version you intend to deploy, e.g.:
oci://registry.example.com/charts/myapp- Version like
1.2.3(must exist in the registry)
- Registry credentials for your OCI registry as a
Secretofkubernetes.io/dockerconfigjsontype:- Create a Kubernetes Secret of type
kubernetes.io/dockerconfigjson(example below).
- Create a Kubernetes Secret of type
- Cluster access for Helm (choose one):
- Mount a Kubeconfig Secret,
- Run the Task under a ServiceAccount with sufficient RBAC.
Step-by-Step Instructions
Step 1: Create the Registry Credential Secret
You need a registry credential for your OCI registry as a Secret of kubernetes.io/dockerconfigjson type.
You can refer to the Prepare Registry Credential.
Step 2: Create Cluster Access Credential
You need a cluster access credential for Helm.
You can refer to the Prepare Cluster Access Credential.
Step 3: Prepare helm image
You need a Helm 3.8+ container image (Helm v3 with OCI support) to run the helm command.
You can refer to the Discover Tool Image.
When searching by label, specify the image as helm, for example: -l operator.tekton.dev/tool-image=helm.
Step 4: Define the Pipeline
This Pipeline installs/upgrades a release directly from an OCI chart reference using helm upgrade --install.
Helm 3.8+ supports referencing charts via oci://... with --version. This keeps the step stateless and fast.
If you prefer to pre-pull the chart, you can helm pull to a temp dir and install from the .tgz path instead.
You can use --wait to blocks until Kubernetes reports the release's resources are ready (or until the operation times out).
Pair it with --timeout to control how long Helm will wait.
It's common to combine with --atomic, which rolls back automatically if the wait fails or times out—so you don't leave a half-upgraded release.
Please replace <helm-image> with your Helm image.
Step 5: Run It with a PipelineRun
- Cluster access for Helm (choose one):
- Mount a Kubeconfig Secret,
- Run the Task under a ServiceAccount with sufficient RBAC.
Please choose one of cluster access credentials.
Troubleshooting
helm: command not found: Ensure yourimageactually contains the Helm binary.unauthorized: authentication required: Ensure the Secret is correct and mounted to registry-creds. ConfirmHELM_REGISTRY_CONFIGis set to that path.Error: chart "myapp" version "x.y.z" not found: The version doesn't exist in the OCI repo or theoci_chartpath is wrong. Verify the pushed tag/version and path.failed to create resource: (…RBAC…) forbidden: The kubeconfig/ServiceAccount lacks permissions. Grant the necessary roles to create/update the resources the chart manages.