helm init - error executing access token command

6/23/2018

Running Ubuntu 18.04

kubectl : 1.10

Google Cloud SDK 206.0.0 alpha 2018.06.18 app-engine-python 1.9.70 app-engine-python-extras 1.9.70 beta 2018.06.18 bq 2.0.34 core 2018.06.18 gsutil 4.32

helm init 
$HELM_HOME has been configured at /home/jam/snap/helm/common.
Error: error installing: Post https://<ip>/apis/extensions/v1beta1/namespaces/kube-system/deployments: error executing access token command "/usr/lib/google-cloud-sdk/bin/gcloud config config-helper --format=json": err=fork/exec /usr/lib/google-cloud-sdk/bin/gcloud: no such file or directory output= stderr=

I have copy pasted the command and it runs fine

Any help ?

-- hounded
kubernetes
kubernetes-helm
ubuntu

2 Answers

6/24/2018

snap is like docker in that I believe its filesystem and your filesystem intersect only in very controlled ways -- otherwise the isolation feature would be null and void. In docker, you can "volume mount" a directory from the host FS into the "guest" FS, so if snap permits such a thing: you'd want to make /usr/lib/google-cloud-sdk available to the snap's FS -- or, of course, just download (or compile) the helm binary like a normal person since it's literally one statically linked go binary

-- mdaniel
Source: StackOverflow

5/6/2020

In my case, /snap/google-cloud-sdk/127/bin/gcloud was called.

I suppose I didn't do it "right", but I just linked my gcloud to the file helm wanted to run.

sudo mkdir -p /snap/google-cloud-sdk/127/bin
sudo ln -s /usr/bin/gcloud /snap/google-cloud-sdk/127/bin/gcloud

After that, helm was able to find gcloud.

-- denis.peplin
Source: StackOverflow