Pushing a Helm chart to a registry
You can push a Helm chart
Note
If you are using a Helm version lower than 3.7.1, re-upload the charts to the Cloud Registry registry 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 Cloud 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 registry.yandexcloud.net -u oauth Password: <OAut_token>
-
-
With an IAM token:
-
Get an IAM token.
-
Run this command:
helm registry login registry.yandexcloud.net -u iam Password: <IAM_token>
-
Result:
Login succeeded
-
-
Create a Helm chart:
helm create <Helm_chart_name>
The name must meet the following requirements:
- It must be 2 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with 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 Cloud Registry:
helm push <Helm_chart_name>-<version>.tgz oci://registry.yandexcloud.net/<registry_ID>
Result:
Pushed: registry.yandexcloud.net/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 Cloud Registry:
helm push my-chart-3.11.2.tgz oci://registry.yandexcloud.net/<registry_ID>
Result:
Pushed: registry.yandexcloud.net/crp3h07fgv9b********/my-chart:3.11.2 Digest: sha256:dc44a4e8b686b043b8a88f77ef9dcb998116fab422e8c892a2370da0********