Create a first-party chart
This packages your own app as a Helm chart, installs it, and publishes it to GitHub Container Registry, which doubles as an OCI chart registry.
It assumes:
- You can reach your cluster with
kubectl(see the kubectl quickstart). - You have Helm installed locally.
- You’ve set up GHCR credentials (Helm reuses the same token; pushing needs
write:packages). See Set up GHCR credentials.
Scaffold a chart
Section titled “Scaffold a chart”helm create helloThis generates a working chart under hello/:
Chart.yaml— the chart’s name and version.values.yaml— default configuration.templates/— the Kubernetes manifests, parameterised with values.
The scaffold deploys nginx out of the box. To ship your own app instead, point
image.repository and image.tag in values.yaml at an image you’ve pushed
(see Ship your first app).
Install from your working copy
Section titled “Install from your working copy”kubectl create namespace helm-demohelm install hello ./hello -n helm-demokubectl rollout status -n helm-demo deploy/helloPackage and publish to GHCR
Section titled “Package and publish to GHCR”Package the chart into a versioned archive (the version comes from Chart.yaml):
helm package helloLog in and push it as an OCI artifact:
helm registry login ghcr.io -u <github-username>helm push hello-0.1.0.tgz oci://ghcr.io/<github-username>Paste the token at the prompt.
Install from the registry
Section titled “Install from the registry”The chart now installs by reference, no working copy needed. This is how others, or your CI, would consume it (using a separate release name so it doesn’t collide with the working-copy install above):
helm install hello-oci oci://ghcr.io/<github-username>/hello --version 0.1.0 -n helm-demoClean up
Section titled “Clean up”helm uninstall hello hello-oci -n helm-demokubectl delete namespace helm-demoThe pushed chart stays in GHCR; delete it from the repository’s package settings if you no longer want it.