Today I was testing helm deployment in GKE. I create the tiller rbac and init helm from the cloud shell in GCP.
I was able to create helm chart by using:
helm create nginx-demo
However, I was not able to install the helm chart.
nick_kou@cloudshell:~$ helm install nginx-demo Error: no available release name found
I tried to change directory and give a name, but I was giving another error:
nick_kou@cloudshell:~/nginx-demo$ helm install nginx-demo Error: failed to download "nginx-demo" (hint: running `helm repo update` may help)
I did upgrade the repo, but it still doesn’t work:
nick_kou@cloudshell:~/nginx-demo$ helm repo update Hang tight while we grab the latest from your chart repositories... ...Skip local chart repository ...Successfully got an update from the "jfelten" chart repository ...Successfully got an update from the "jetstack" chart repository ...Successfully got an update from the "stable" chart repository Update Complete. nick_kou@cloudshell:~/nginx-demo$ helm install nginx-demo Error: failed to download "nginx-demo" (hint: running `helm repo update` may help)
After a few minutes investigation on tiller’s log. I found it doesn’t init properly. So I did init by using the proper service account.
helm init --service-account tiller --upgrade
And then I’m able to install the helm chart:
nick_kou@cloudshell:~$ helm install nginx-demo NAME: foppish-jellyfish LAST DEPLOYED: Thu Sep 5 10:56:48 2019 NAMESPACE: default STATUS: DEPLOYED RESOURCES: ==> v1/Deployment NAME READY UP-TO-DATE AVAILABLE AGE foppish-jellyfish-nginx-demo 0/1 1 0 0s ==> v1/Pod(related) NAME READY STATUS RESTARTS AGE foppish-jellyfish-nginx-demo-757fcbcd97-9kpv5 0/1 ContainerCreating 0 0s ==> v1/Service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE foppish-jellyfish-nginx-demo ClusterIP 10.12.9.20880/TCP 0s NOTES: 1. Get the application URL by running these commands: export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=nginx-demo,app.kubernetes.io/instance=foppish-jellyfish" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl port-forward $POD_NAME 8080:80