我从门户屏幕创建了Devops Project。使用.NetCore配置并将部署部署为Kubernetes。首次成功部署项目。但是在我重做CICD流程后的几天。然后,在Helm初始化任务中发生错误(错误:未找到分till。超过了轮询期限)。
我想到了故障的Kubernetes集群,所以我创建了一个新的Kubernetes集群,并更改了配置以再次部署它,但仍然出现此错误。
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
答案 0 :(得分:0)
您可以尝试使用helm init命令添加--upgrade
标志,这样可以解决某些情况下的错误。
如果错误仍然存在,则可以删除参数“ –service-account tiller”,然后重试。
如果使用的是单节点群集。尝试以下命令:
$ kubectl taint nodes --all node-role.kubernetes.io/master-
更新:
要创建服务帐户和集群绑定,请执行以下操作:
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller