Adding the internal Helm repository to Helm CLI
The internal Helm repository 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/hosts
file. 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.icp
and 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.
-
Make sure HELM_HOME is 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://<Cluster Master Host>:<Cluster Master API Port> --skip-ssl-validation
For example, if
<Cluster Master Host>
ismycluster.icp
and<Cluster Master API Port>
is8443
:cloudctl login -a https://mycluster.icp:8443 --skip-ssl-validation
When the last output statement from the
cloudctl login
command 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. -
Enter the following command to define the
local-charts
repository to the Helm CLI and specify the certificates that you copied in the previous step:sudo helm repo add local-charts https://<Cluster Master Host>:<Cluster Master API Port>/helm-repo/charts --ca-file $HELM_HOME/ca.pem --cert-file $HELM_HOME/cert.pem --key-file $HELM_HOME/key.pem
For example, if
<Cluster Master Host>
ismycluster.icp
and<Cluster Master API Port>
is8443
: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.pem
These certificates are used when you add the internal IBM Cloud Private
local-charts
Helm repository that is managed by thehelm-repo
deployment. -
You can enter the following command to add the internal IBM Cloud Private Helm repository called
mgmt-charts
that is managed by themgmt-repo
deployment:sudo helm repo add mgmt-charts https://<Cluster Master Host>:<Cluster Master API Port>/mgmt-repo/charts --ca-file $HELM_HOME/ca.pem --cert-file $HELM_HOME/cert.pem --key-file $HELM_HOME/key.pem
For example, if
<Cluster Master Host>
ismycluster.icp
and<Cluster Master API Port>
is8443
: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.pem
Tip: It is not generally required to add the
mgmt-charts
repository. It contains the Helm charts for IBM Cloud Private internal services and features. -
Verify that the repositories are accessible to the Helm CLI by entering the following command:
helm repo list
-