Pushing a Helm chart to a registry
You can push Helm Charts
Note
If you are using a Helm version below 3.7.1, re-push 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 later.Note
Installing Helm does not automatically update environment variables. To run
helmcommands, 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:
OAuth token authentication is deprecated
This authentication method will no longer be supported. Consider using IAM tokens or API keys.
-
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>
-
-
With an IAM 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:
- Length: between 3 and 63 characters.
- It can only 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 push:
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-chartResult:
Creating my-chart -
Build a Helm chart to push:
helm package my-chart/. --version 3.11.2Result:
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********