AKS Kubernetes with Azure DevOps Pipeline-helm升级错误



我是一个完整的Azure DevOps noob,试图在Azure DevOps中建立一个AKS集群和一个发布管道,以便使用Helm部署到它。

我创建了一个AKS集群(为了简化过程,禁用了RBAC(,连接了一个发布管道,使用Azure Cloud Shell连接到AKS集群,并运行了helm init,但发布失败,出现了以下问题:

2018-12-14T16:35:55.9461744Z ##[section]Starting: helm upgrade <REDACTED>
2018-12-14T16:35:55.9467164Z ==============================================================================
2018-12-14T16:35:55.9467299Z Task         : Package and deploy Helm charts
2018-12-14T16:35:55.9467387Z Description  : Deploy, configure, update your Kubernetes cluster in Azure Container Service by running helm commands.
2018-12-14T16:35:55.9467647Z Version      : 0.138.14
2018-12-14T16:35:55.9467963Z Author       : Microsoft Corporation
2018-12-14T16:35:55.9468016Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=851275)
2018-12-14T16:35:55.9468114Z ==============================================================================
2018-12-14T16:35:58.3023980Z [command]/opt/hostedtoolcache/helm/2.11.0/x64/linux-amd64/helm upgrade --namespace dev --install --recreate-pods --force --values /home/vsts/work/r1/a/_<REDACTED>/helm-charts/<REDACTED>/values-dev.yaml --set image.tag=development --wait <REDACTED> /home/vsts/work/r1/a/_<REDACTED>/helm-charts/<REDACTED>
2018-12-14T16:40:57.6309603Z Release "<REDACTED>" does not exist. Installing it now.
2018-12-14T16:40:57.6311297Z Error: release <REDACTED> failed: timed out waiting for the condition
2018-12-14T16:40:57.6428880Z ##[error]Error: release <REDACTED> failed: timed out waiting for the condition
2018-12-14T16:40:57.6440575Z ##[section]Finishing: helm upgrade <REDACTED>

(注意,删除了敏感项目名称(。

由于您正在使用--wait标志进行部署

如果设置,将等待所有Pod、PVC、服务和最小数量在标记发布成功。它将等待长达--timeout

如果有任何作业或挂钩运行时间超过300秒,则可以设置--timeout n标志,该标志包含作业完成所需的秒数。

如果您的部署中没有运行任何作业:

  • 检查所有吊舱是否处于就绪状态。例如,如果您有任何pod处于CrashLoopBackoff状态,则helm将超时失败
  • 如果您的吊舱需要300秒以上才能进入就绪状态,请找到最佳timeout

最新更新