Helm repo: Difference between revisions
Line 21: | Line 21: | ||
=Add a New Repository= | =Add a New Repository= | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
helm repo add <repository-name> <repository-url> | helm repo add <repository-name> <repository-url> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang='bash'> | |||
helm repo add dev https://example.com/dev-charts | |||
</syntaxhighlight> | |||
==Adding a Repository that Requires Authentication== | |||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
helm repo add | helm repo add <repository-name> <repository-url> --username <username> --password <password> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<font color=darkgray>If the repository is password protected, the advantage of caching the repository remote while using --username and --password is that the username and the password are cached and not to have specified every time the chart is installed.</font>Note that the repository must expose an index.yaml, otherwise the above command will fail with .../index.yaml 404 Not Found. | <font color=darkgray>If the repository is password protected, the advantage of caching the repository remote while using --username and --password is that the username and the password are cached and not to have specified every time the chart is installed.</font>Note that the repository must expose an index.yaml, otherwise the above command will fail with .../index.yaml 404 Not Found. | ||
To test that the authentication works: | |||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
helm repo | helm search repo <repository-name> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<repository-url> does not work when used with the [[Helm search|helm search]] command. | |||
==What Happens when a New Repository is Added== | ==What Happens when a New Repository is Added== |
Revision as of 04:48, 1 December 2020
External
Internal
Overview
Revised for Helm 3
Caching repositories locally is useful when installing charts and specifying the chart to be installed using the name of the locally cached repository and the name of the chart. However, charts can be installed directly from the remote repository, without having to add (cache) the repository locally. The repositories are cached locally with helm repo add command, but the cache is not automatically kept up to date in any way, it has to be explicitly updated with helm repo update.
List Repositories Helm is Configured With
helm repo list
List All Charts in a Repository
Add a New Repository
helm repo add <repository-name> <repository-url>
helm repo add dev https://example.com/dev-charts
Adding a Repository that Requires Authentication
helm repo add <repository-name> <repository-url> --username <username> --password <password>
If the repository is password protected, the advantage of caching the repository remote while using --username and --password is that the username and the password are cached and not to have specified every time the chart is installed.Note that the repository must expose an index.yaml, otherwise the above command will fail with .../index.yaml 404 Not Found.
To test that the authentication works:
helm search repo <repository-name>
<repository-url> does not work when used with the helm search command.
What Happens when a New Repository is Added
A new entry is added to repositories.yaml.
Update the Local Repository Cache
The command reaches out to remote repositories Helm installation is configured with and gets the latest information about charts. Information is cached locally
helm [--debug] repo update
Find what Versions of a Specific Chart are Available in a Repository
One method is to download (or look on-line) at the repository index and do a text search.
Remove a Locally Configured Repository
helm repo remove <repository-name>
Generate an Index File
helm repo index <chart-dir>
Generates an index from files in the directory specified as argument, which is expected to contain packaged charts.