Log In and Connect CLI
In this step you want to log into IBM Cloud, and connect to your Kubernetes cluster via your terminal so you can run a number of commands.
First, log into IBM Cloud
bx login -a https://api.ng.bluemix.net
Next, connect to your Kubernetes cluster. If you don’t know the name of your cluster, simply run the following:
bx cs clusters
Once you have the name of your cluster, connect to it using this command:
bx cs cluster-config <clustername>
To verify all is well, run a couple commands:
kubectl get nodes
Get Ingress Values
In this step, you want to find the ingress subdomain and ingress secret for your cluster so that when ChartMuseum is installed it can be accessed from authorized users. To find these values, run the following command:
bx cs cluster-get <clustername>
In the output, you will see 2 lines. In this example, my cluster name is yourclustername, so the Ingress Subdomain and Ingress Secret look like the following:
Ingress Subdomain: yourclustername.us-south.containers.mybluemix.net
Ingress Secret: yourclustername
Save these for later.
Add Public Helm Repo with ChartMuseum
To install ChartMuseum, you first need to add the helm repo that it resides into your cluster’s helm registry. To do that, run the following command:
helm repo add stable https://kubernetes-charts.storage.googleapis.com
Prepare to Deploy ChartMuseum
Since you need to customize the values when installing ChartMuseum, you’ll want to download the values .yaml file. Run this to get the properly formatted values yaml file that we will call ‘chartmuseum.yaml’:
helm inspect values stable/chartmuseum > chartmuseum.yaml
Here are the changes you should make: (Note that I use my default storage class, but if you want to customize what kind of storage is used, there is an option to also set a storageclass in the yaml file).
# you'll want to remove the comments and then edit the following using your ingress details from above. Be SURE to have your indentation accurate or it will fail deployment.
- secretName: yourclustername
Once you’ve edited and saved the yaml file from above, run this command to install:
helm install -n chartmuseum -f chartmuseum.yaml stable/chartmuseum
Once the pod is running, ensure chartmuseum is accessible from your browser. To do that, open a browser and paste in your subdomain and you should see a “Welcome to ChartMuseum” screen:
That’s it. Now you can add helm charts. For examples, study this link: