【问题标题】:Azure Heml Init task fail to find kubectlAzure Heml Init 任务找不到 kubectl
【发布时间】:2019-11-20 16:22:42
【问题描述】:

由于引入了新的 Helm 安装任务或 3.0 Helm 版本,我们所有的构建和发布管道一夜之间都失败了。我们设法通过在预览中使用 *1 版本来修复 Helm 安装,并安装最后一个工作 helm 是 2.16.0。在那之后,我们的任务 Heml Init 失败了,因为它找不到 kubectl。昨天一切正常。这发生在我们所有的构建和发布中。由于某种原因,它试图在其中查找 kubectl 的目录为空。晚上有什么变化吗?

日志:

2019-11-14T10:22:21.1487212Z ##[debug]Kubeconfig file path: C:\agent\_work\_temp\helmTask\1573726941144\config
2019-11-14T10:22:21.1494250Z ##[debug]which 'kubectl'
2019-11-14T10:22:21.1574073Z ##[debug]not found
2019-11-14T10:22:21.1576552Z ##[debug]task result: Failed
2019-11-14T10:22:21.1634103Z ##[error]Error: Unable to locate executable file: 'kubectl'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.
2019-11-14T10:22:21.1641140Z ##[debug]Processed: ##vso[task.issue type=error;]Error: Unable to locate executable file: 'kubectl'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.
2019-11-14T10:22:21.1642296Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error: Unable to locate executable file: 'kubectl'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.```

【问题讨论】:

  • 是的,我们昨晚做了一些提交,我们改变的也是helmTool的路径。见github.com/microsoft/azure-pipelines-tasks/commit/… 现在还出现错误吗?不知道您的错误是由于我们的pr正在合并还是由于pr完成和脚本更改造成的。能不能再重新运行一下看看现在是否还存在?
  • 我们已经更新了 k8s 和 helm 任务以安装 3.0.0,但我们仍然遇到了问题,但现在又出现了一个问题。用掌舵初始化。 2019-11-18T08:34:47.4616575Z ##[错误]错误:未知标志:--upgrade
  • 附言。我们在作为代理的自托管 VM 上执行此操作,这会导致问题吗?
  • 所以之前的错误消失了,现在又出现了一个错误?如果是这样,您能否将此票证更新为新的错误消息(更好的是已完成日志)?
  • 我在下面添加了解决方案。

标签: azure-devops azure-pipelines kubernetes-helm


【解决方案1】:

解决方案是将 checkLatestHemlVersion 添加为 false:

- task: HelmInstaller@0
   displayName: 'Install Helm 2.16.1'
   inputs:
     helmVersion: 2.16.1
     checkLatestHelmVersion: false

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-01-06
    • 1970-01-01
    • 1970-01-01
    • 2019-04-20
    • 1970-01-01
    • 2020-07-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多