Pushing a Helm chart to a registry
You can push Helm Charts
Note
If you are using a Helm version lower than 3.7.1, re-upload the charts to the Container Registry repository when upgrading to a newer version.
To push a Helm chart:
-
Install
the Helm client version 3.8.0 or higher.Note
When installing Helm, environment variables are not updated automatically. To run
helm
commands, use the installation directory or manually add Helm to environment variables. -
If you are using a Helm version below 3.8.0, enable Open Container Initiative
support in the Helm client:export HELM_EXPERIMENTAL_OCI=1
-
Authenticate your Helm client in the Container Registry registry using one of the available methods.
-
With an OAuth token:
-
If you do not have an OAuth token yet, get one by following this link
. -
Run this command:
helm registry login cr.yandex -u oauth Password: <OAuth_token>
-
-
Using an Yandex Identity and Access Management token:
-
Run this command:
helm registry login cr.yandex -u iam Password: <IAM_token>
Result:
Login succeeded
-
-
Create a Helm chart:
helm create <Helm_chart_name>
The name must meet the following requirements:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
Result:
Creating <Helm_chart_name>
-
Build a Helm chart to upload:
helm package <Helm_chart_name>/. --version <Helm_chart_version>
Result:
Successfully packaged chart and saved it to: <path>/<Helm_chart_name>-<version>.tgz
-
Push the Helm chart to Container Registry:
helm push <Helm_chart_name>-<version>.tgz oci://cr.yandex/<registry_ID>
Result:
Pushed: cr.yandex/crp3h07fgv9b********/<Helm_chart_name>:<version> Digest: <SHA256...>
Examples
-
Create a Helm chart:
helm create my-chart
Result:
Creating my-chart
-
Build a Helm chart to upload:
helm package my-chart/. --version 3.11.2
Result:
Successfully packaged chart and saved it to: C:/my-chart-3.11.2.tgz
-
Push the Helm chart to Container Registry:
helm push my-chart-3.11.2.tgz oci://cr.yandex/<registry_ID>
Result:
Pushed: cr.yandex/crp3h07fgv9b********/my-chart:3.11.2 Digest: sha256:dc44a4e8b686b043b8a88f77ef9dcb998116fab422e8c892a2370da0********