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.

  1. (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 as mycluster.icp and resolves to IP 1.2.3.4, you would add the following alias:

      vi /etc/hosts
      # Add a line like the following:
      1.2.3.4 mycluster.icp
    
  2. Import and trust the certificates for the cluster.

    1. Make sure HELM_HOME is defined to point to the Helm work directory (usually ~/.helm) by entering the following command:

      export HELM_HOME=~/.helm
      
    2. Initialize the Helm CLI by entering the following command:

      helm init --client-only
      
    3. Log on to the IBM® Cloud Private cluster by entering the following command:

      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.

    4. 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://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 the helm-repo deployment.

    5. You can enter the following command to add the internal IBM Cloud Private Helm repository called mgmt-charts that is managed by the mgmt-repo deployment:

      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.

    6. Verify that the repositories are accessible to the Helm CLI by entering the following command:

      helm repo list