Adding the internal Helm repository to Helm CLI
The internal Helm repository that is named local-charts can now be added to the Helm CLI as an external repository. local-charts can be used as a source to install charts into the cluster from Helm CLI.
-
(Optional) If the cluster master server is not resolvable through your domain name server (DNS), you can add
<Cluster Master Host>as an alias in the/etc/hostsfile. The alias points to the master node IP address or addresses. Note:<Cluster Master Host>is defined in Master endpoints. For example, if the<Cluster Master Host>is defined asmycluster.icpand resolves to IP1.2.3.4, you would add the following alias:vi /etc/hosts # Add a line like the following: 1.2.3.4 mycluster.icp -
Import and trust the certificates for the cluster.
-
Ensure that
HELM_HOMEis defined to point to the Helm work directory (usually~/.helm) by entering the following command:export HELM_HOME=~/.helm -
Initialize the Helm CLI by entering the following command:
helm init --client-only -
Log on to the IBM® Cloud Private cluster by entering the following command:
cloudctl login -a https://mycluster.icp:8443 --skip-ssl-validationWhen the last output statement from the
cloudctl logincommand reads that it configured Helm successfully, the certificates were copied to the HELM_HOME directory.Note: If you cannot log on to cluster, see Accessing your cluster from the Kubernetes CLI (kubectl) for information about how to configure the CLI.
-
Optional. If you are using your own (BYO) certificate, copy the following file and, if needed, directory structure to your client host:
<installation-dir>/cluster/cfc-certs/router/icp-router-ca.crt
-
Run the following command to define the
local-chartsrepository to the Helm CLI and specify the certificates that you copied in the previous step:sudo helm repo add local-charts https://mycluster.icp:8443/helm-repo/charts --ca-file $HELM_HOME/ca.pem --cert-file $HELM_HOME/cert.pem --key-file $HELM_HOME/key.pemThese certificates are used when you add the internal IBM Cloud Private
local-chartsHelm repository that is managed by thehelm-repodeployment.If you are using your own (BYO) certificate, replace
$HELM_HOME/ca.pemwith the certificate authority (CA) certificate for your own certificate. -
You can enter the following command to add the internal IBM Cloud Private Helm repository that is called
mgmt-chartsthat is managed by themgmt-repodeployment:sudo helm repo add mgmt-charts https://mycluster.icp:8443/mgmt-repo/charts --ca-file $HELM_HOME/ca.pem --cert-file $HELM_HOME/cert.pem --key-file $HELM_HOME/key.pemTip: It is not generally required to add the
mgmt-chartsrepository. It contains the Helm charts for IBM Cloud Private internal services and features.If you are using your own (BYO) certificate, replace
$HELM_HOME/ca.pemwith the certificate authority (CA) certificate for your own certificate. -
Verify that the repositories are accessible to the Helm CLI by entering the following command:
helm repo list
-