gpt4 book ai didi

azure - 具有 Azure DevOps Pipeline 的 AKS Kubernetes - helm 升级错误

转载 作者:行者123 更新时间:2023-12-03 04:46:20 26 4
gpt4 key购买 nike

我是一名彻头彻尾的 Azure DevOps 菜鸟,尝试在 Azure DevOps 中设置 AKS 集群和发布管道,以便使用 Helm 进行部署。

我创建了(禁用 RBAC,以简化流程)一个 AKS 群集,将发布管道连接到它,使用 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 标志

if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful. It will wait for as long as --timeout

如果您有任何运行时间超过 300 秒的作业或 Hook ,您可以设置 --timeout n 标志来指定作业完成所需的秒数。

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

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

关于azure - 具有 Azure DevOps Pipeline 的 AKS Kubernetes - helm 升级错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53783806/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com