IBM Support

Helm client not working after upgrading IBM cloud Private

Troubleshooting


Problem

You may see issues after upgrading the IBM Cloud Private or after refreshing the helm certificates. 

Symptom

Following error when you run helm commands 
# helm version --tls

Client: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}

Error: forwarding ports: error upgrading connection: error dialing backend: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "www.ibm.com")
You can run use the --debug to find more details 
helm version --tls --debug

Cause

Certificated have to be updated for the helm client

Resolving The Problem

Following steps are done during the product installation helm-config task    
     cd ~/.helm
     helm init --client-only --skip-refresh
     export HELM_HOME=~/.helm
     kubectl -n kube-system get secret cluster-ca-cert -o jsonpath='{.data.tls\.crt}' | base64 -d > ca.crt
     kubectl -n kube-system get secret cluster-ca-cert -o jsonpath='{.data.tls\.key}' | base64 -d > ca.key
     openssl genrsa -out $HELM_HOME/key.pem 4096
In the following command `admin` is the default admin username the config.yaml, update the following CN value if different
     openssl req -new -key $HELM_HOME/key.pem -out $HELM_HOME/csr.pem -subj "/C=US/ST=New York/L=Armonk/O=IBM Cloud Private/CN=admin"

     openssl x509 -req -in $HELM_HOME/csr.pem -extensions v3_usr -CA ca.crt -CAkey ca.key -CAcreateserial -out $HELM_HOME/cert.pem
Test to make sure the tiller pod is up and running 
      kubectl -n kube-system get pods -l app=helm,name=tiller

      NAME                             READY   STATUS    RESTARTS   AGE
      tiller-deploy-567486c584-hbqfr   1/1     Running   0          6h37m

Run helm command to test 
 helm version --tls --debug
 helm list --tls

 

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSBS6K","label":"IBM Cloud Private"},"ARM Category":[{"code":"a8m50000000Ck50AAC","label":"IBM Cloud Private-\u003EUpgrade"}],"ARM Case Number":"TS011144165","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
18 November 2022

UID

ibm16840023