Can't do 'helm install' on cluster. Tiller was installed by gitab

1/27/2019

I created a cluster in GKE using Gitlab and installed Helm & Tiller and some other stuffs like ingress and gitlab runner using gitab's interface. But when I try to install something using helm from gcloud, it gives "Error: Transport is closing".

I did gcloud container clusters get-credentials ....

$ kubectl get pods --all-namespaces

NAMESPACE               NAME                                                     READY     STATUS    RESTARTS   AGE
default                 jaeger-deployment-59ffb979c8-lmjk5                       1/1       Running   0          17h
gitlab-managed-apps     certmanager-cert-manager-6c8cd9f9bf-67wnh                1/1       Running   0          17h
gitlab-managed-apps     ingress-nginx-ingress-controller-75c4d99549-x66n4        1/1       Running   0          21h
gitlab-managed-apps     ingress-nginx-ingress-default-backend-6f58fb5f56-pvv2f   1/1       Running   0          21h
gitlab-managed-apps     prometheus-kube-state-metrics-6584885ccf-hr8fw           1/1       Running   0          22h
gitlab-managed-apps     prometheus-prometheus-server-69b9f444df-htxsq            2/2       Running   0          22h
gitlab-managed-apps     runner-gitlab-runner-56798d9d9d-nljqn                    1/1       Running   0          22h
gitlab-managed-apps     tiller-deploy-74f5d65d77-xk6cc                           1/1       Running   0          22h
kube-system             heapster-v1.6.0-beta.1-7bdb4fd8f9-t8bq9                  2/2       Running   0          22h
kube-system             kube-dns-7549f99fcc-bhg9t                                4/4       Running   0          22h
kube-system             kube-dns-autoscaler-67c97c87fb-4vz9t                     1/1       Running   0          22h
kube-system             kube-proxy-gke-cluster2-pool-1-05abcbc6-0s6j             1/1       Running   0          20h
kube-system             kube-proxy-gke-cluster2-pool-2-67e57524-ht5p             1/1       Running   0          22h
kube-system             metrics-server-v0.2.1-fd596d746-289nd                    2/2       Running   0          22h
visual-react-10450736   production-847c7d879c-z4h5t                              1/1       Running   0          22h
visual-react-10450736   production-postgres-64cfcf9464-jr74c                     1/1       Running   0          22h
$ ./helm install stable/wordpress --tiller-namespace gitlab-managed-apps --name wordpress

E0127 10:27:29.790366     418 portforward.go:331] an error occurred forwarding 39113 -> 44134: error forwarding port 44134 to pod 86b33bdc7bc30c08d98fe44c0772517c344dd1bdfefa290b46e82bf84959cb6f, uid : exit status 1: 2019/01/27 04:57:29 socat[11124] E write(5, 0x14ed120, 186): Broken pipe

Error: transport is closing

Another one

$ ./helm install incubator/jaeger --tiller-namespace gitlab-managed-apps --name jaeger --set elasticsearch.rbac.create=true --set provisionDataStore.cassandra=false --set provisionDataStore.elasticsearch=true --set storage.type=elasticsearch

E0127 10:30:24.591751     429 portforward.go:331] an error occurred forwarding 45597 -> 44134: error forwarding port 44134 to pod 86b33bdc7bc30c08d98fe44c0772517c344dd1bdfefa290b46e82bf84959cb6f, uid : exit status 1: 2019/01/27 05:00:24 socat[13937] E write(5, 0x233d120, 8192): Connection reset by peer

Error: transport is closing

I tried forwarding ports myself and it never returns to prompt, takes forever.
kubectl port-forward --namespace gitlab-managed-apps tiller-deploy 39113:44134

Apparently installing anything from Gitab's ui uses Helm and those do not fail. Yet doing so from shell fails. Please help me out. Thanks in advance.

-- Shivam Singha
gitlab
gitlab-ci
google-kubernetes-engine
kubernetes-helm

1 Answer

3/6/2019

I know it's late but I'll share this just in case someone else struggles with this issue. I've found an answer in the gitlab forums: HERE.

The trick is to export and decode the certificates from the tiller service account and pass them as arguments to helm like this:

helm list --tiller-connection-timeout 30 --tls --tls-ca-cert tiller-ca.crt --tls-cert tiller.crt --tls-key tiller.key ---all --tiller-namespace gitlab-managed-apps
-- Xavi
Source: StackOverflow