I created Devops Project from the portal screen. With the .NetCore configuration and deploying the deploy as Kubernetes. The first time Project successfully deployed. But then a few days after I redo the CICD process. Then an error occurs in Helm init task (Error: tiller was not found. polling deadline exceeded) .
I thought of the faulty Kubernetes Cluster, so I created a new Kubernetes Cluster and changed the configuration to deploy it again but still got this error.
2019-09-16T16:54:12.0015296Z ##[section]Starting: Helm init
2019-09-16T16:54:12.0021184Z ==============================================================================
2019-09-16T16:54:12.0021339Z Task : Package and deploy Helm charts
2019-09-16T16:54:12.0021427Z Description : Deploy, configure, update a
Kubernetes cluster in Azure Container Service by running helm commands
2019-09-16T16:54:12.0021523Z Version : 0.156.0
2019-09-16T16:54:12.0021722Z Author : Microsoft Corporation
2019-09-16T16:54:12.0021797Z Help :
https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/helm-deploy
2019-09-16T16:54:12.0022034Z ==============================================================================
2019-09-16T16:54:13.4897639Z [command]/opt/hostedtoolcache/helm/2.14.3/x64/linux-amd64/helm init --tiller-namespace dev103c --wait --service-account tiller
2019-09-16T16:59:14.4597893Z $HELM_HOME has been configured at /home/vsts/.helm.
2019-09-16T16:59:14.4599220Z Warning: Tiller is already installed in the cluster.
2019-09-16T16:59:14.4600865Z (Use --client-only to suppress this message, or --upgrade to upgrade Tiller to the current version.)
2019-09-16T16:59:14.4603949Z Error: tiller was not found. polling deadline exceeded
2019-09-16T16:59:14.4741099Z ##[error]Error: tiller was not found. polling deadline exceeded
2019-09-16T16:59:14.4755373Z ##[section]Finishing: Helm init
You can try add the --upgrade
flag with helm init command, this would solve the error for some cases.
If error persists, You could remove the argument “–service-account tiller” and have a try again.
And if if you are using single node cluster. Try below command:
$ kubectl taint nodes --all node-role.kubernetes.io/master-
Update:
To create serviceaccount and clusterrolebinding:
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller