Add ChartMuseum Repository
Now it’s time to recall the repository discussion that we had in the beginning. We had a quick overview of what a repository is and how it works.
The repository is very similar to the APT or yum repository that we have as a part of the Linux systems, where it will have a collection of packages.
Whenever I wanted to install a package, First, I need to add the reference to the repository where it is located and gave an alias name to it.
So once the reference is added to the list of repositories, any package that I wanted to install. It’s going to search within that specific repository list that we have. And for that, we do have a command called repo list.
[email protected]:~$ helm repo list NAME URL stable https://charts.helm.sh/stable
In the beginning, we added the stable repository to try out a few of the charts. And this is the URL that we had provided. If you remember, this is the URL where the charts are added.
So the location for our repository is it is running in my cluster node. Now I can provide the IP address of my cluster node and add this particular repository with the name.
So I’m going to use the helm repo add command and give a name to it helm repo add and provide a name and the URL.
[email protected]:~$ helm repo add mychartmuseumrepo http://192.168.1.50:8080
So I gave the name mychartmuseumrepo and the URL where I do have the chart museum running. It is running in this specific IP address. I’m providing the IP address; I wanted that to get access from any location. If you’re running it in the local machine, you can give localhost as well.
So the repository will get added. Now I can go ahead and list the repositories available.
[email protected]:~$ helm repo list NAME URL stable https://charts.helm.sh/stable mychartmuseumrepo http://192.168.1.50:8080
So I do have mychartmuseumrepo that got added just now. Now I can go ahead and search the charts available. It’s going to search in both the repositories.
[email protected]:~$ helm search repo nginx NAME CHART VERSION APP VERSION DESCRIPTION stable/nginx-ingress 1.41.3 v0.34.1 DEPRECATED! An nginx Ingress controller that us… stable/nginx-ldapauth-proxy 0.1.6 1.13.5 DEPRECATED - nginx proxy with ldapauth stable/nginx-lego 0.3.1 Chart for nginx-ingress-controller and kube-lego stable/gcloud-endpoints 0.1.2 1 DEPRECATED Develop, deploy, protect and monitor…
It’s going to search for the chart with the name Nginx. And as of now, it is available only within the stable, and there are no charts available within the mychartmuseumrepo.
So nothing is getting listed. Since the repository that we have is a new repository, there will not be any chart. I can go ahead and search as well using the following command.
[email protected]:~$ helm search repo mychartmuseumrepo No results found
The repo doesn’t have any chart. If I search for stable, it will search all the charts available within it, and their name and version will be listed.
In a quick summary, we discussed adding the repo and referring to the chart museum that we had created. In the following tutorial, we will create a chart, add it to our repository, and manage it.