0
votes

Helm install called from the cloud shell worked last week but now regardless of using bash or powershell it returns

Error: could not find tiller

Last week I was able to create an ingress controller by following the Microsoft article Create an HTTPS ingress controller on Azure Kubernetes Service (AKS)

now when I get to the helm install step I get the error indicated in the title. To recreate this issue:

  • Do clouddrive unmount from within the powershell cloud shell.
  • Using the Azure portal delete your cloudshell file share in Azure Storage.
  • create a 2 node 'B2s' Kubernetes Service using Advanced networking using the provided defaults.
  • Open the Cloud Shell using either bash or Powershell.
  • Do az aks get-credentials and provide the name of your AKS cluster.
  • Do kubectl create namespace ingress-basic
  • Do helm repo add stable https://kubernetes-charts.storage.googleapis.com/
  • the command above will warn that you need to perform a helm init.
  • Do a az aks list to get the servicePrincipalProfile:clientId of your AKS cluster
  • Do helm init --service-account using the clientId of the command above for the service-account parameter
  • Do the helm install using the parameters from the Microsoft Docs Create an HTTPS ingress controller on Azure Kubernetes Service (AKS)

At this point you should get the error mentioned in the title. Any suggestions on what I might be missing.

3
Tiller is gone and no longer a thing as of helm 3.x. What version of helm are you trying to use?jordanm
I forgot to mentioned that I tried to install helm multiple times. Every time it indicates that it already exists on the cluster. But every helm install gives me the same error.bmukes
i think cloud shell is still using helm v2, not v3, hence the need for tiller4c74356b41

3 Answers

0
votes

right, I think you need to actually create a service account in kubernetes in order for this to work, sample code:

kubectl -n kube-system create serviceaccount tiller

kubectl create clusterrolebinding tiller \
  --clusterrole=cluster-admin \
  --serviceaccount=kube-system:tiller

helm init --service-account tiller

# Users in China: You will need to specify a specific tiller-image in order to initialize tiller. 
# The list of tiller image tags are available here: https://dev.aliyun.com/detail.html?spm=5176.1972343.2.18.ErFNgC&repoId=62085. 
# When initializing tiller, you'll need to pass in --tiller-image

helm init --service-account tiller \
--tiller-image registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:<tag>

https://rancher.com/docs/rancher/v2.x/en/installation/options/helm2/helm-init/

whereas you are trying to use Azure Service Principal instead of Kubernetes Service Account. They are not the same thing.

0
votes

OK two items.

  1. Tiller was not installed. on 2/14/2020 I was able to install an ingress controller using helm. But on 2/18 I was not able to do a helm install --dry-run on a chart because of the above mentioned error. Anyway after following this documentation Install applications with Helm in Azure Kubernetes Service (AKS) I got Tiller installed properly.
  2. After getting Tiller properly installed the helm install command for the ingress controller Create an HTTPS ingress controller on Azure Kubernetes Service (AKS) was failing with chart not found error.

I modified the command from

helm install nginx stable/nginx-ingress \

to

helm install stable/nginx-ingress \

and the chart is now deploying properly. I am now back to where I was on 2/14. Thanks everyone for the help.

0
votes

OK got the following letter from Microsoft Tech Support letting me know that there was a problem with Azure Cloud Shell. I did a Helm version this morning and now see

version.BuildInfo{Version:"v3.1.1", GitCommit:"afe70585407b420d0097d07b21c47dc511525ac8", GitTreeState:"clean", GoVersion:"go1.13.8"}

Which I did not see on 2/14. So I looks like I was NOT crazy and that Microsoft has fixed this issue. Based on her letter the issue with the chart name should also be resolved.

Hi Brian, Thanks for your update. We are so sorry for the inconvenience. There was an error in the script which builds the cloud shell image. Helm released 2.16.3 more recently than 3.1 and the build script picked that up as the 'latest' release, causing the inadvertent downgrade. As helm v3 does not require tiller pod, so the tiller pod cannot be found when using helm v2. The helm version will be re-upgraded in the next release. As confirmed by you, the queries related to this issue have been solved and hence I will go ahead and archive your case at this time. Please remember that support for this case does not end here. Should you need further assistance with your issue, you can reach out to me and I will continue working with you. Here is a summary of the key points of the case for your records. Issue Definition: Helm install Error: could not find tiller. Resolution/Suggestion Summary: You could refer to the follow the below document to configure helm V2: https://docs.microsoft.com/en-us/azure/aks/kubernetes-helm#install-an-application-with-helm-v2. Alternatively, you may also use the command below to upgrade the helm to version 3 as a workaround: curl https://aka.ms/cloud-shell-helm3 | bash. The command ‘helm version’ can be used to verify the version of Helm you have installed.

Besides, the syntax for helm 3 is different from helm 2. The syntax for helm v3 is ‘helm install [NAME] [CHART] [flags]’ while for hem v2 is ‘helm install [CHART] [flags]’. So you need to remove the word nginx after the word install if you are using helm v2. You could refer to the following document for more information: https://docs.microsoft.com/en-us/azure/aks/kubernetes-helm#install-an-application-with-helm-v2

It was my pleasure to work with you on this service request. Please do not hesitate to contact me if I can be of further assistance. Thank you very much for your support of Microsoft Azure. Have a nice day😊!