You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure DevOps经典UI发布流水线部署Helm Chart方案咨询

Azure DevOps Helm Chart部署方案解析

经典UI流水线的非YAML部署选项

内置HelmDeploy任务并非Azure DevOps中部署Helm Chart的唯一方式,经典UI发布流水线可以通过以下两种方式实现:

  • Command Line任务直接执行Helm命令

    1. 若代理节点未预装Helm,先完成安装(以Linux为例):
      curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
      
    2. 配置K8s集群凭证:针对Azure AKS,执行az aks get-credentials --resource-group <your-rg> --name <your-aks>获取kubeconfig;其他集群可通过设置KUBECONFIG环境变量或复制kubeconfig文件到代理节点
    3. 执行部署命令:
      helm upgrade --install <release-name> $(System.ArtifactsDirectory)/path/to/chart.tgz --values $(System.ArtifactsDirectory)/custom-values.yaml --namespace <target-ns>
      
  • Azure CLI任务集成Helm操作
    借助Azure CLI的Helm扩展,无需单独安装Helm:

    1. 添加Azure CLI任务,关联目标Azure订阅
    2. 在脚本中执行集群认证与部署:
      az aks install-cli
      az aks get-credentials --resource-group <your-rg> --name <your-aks>
      helm upgrade --install <release-name> $(System.ArtifactsDirectory)/chart.tgz --namespace <target-ns> --create-namespace
      

关于helm template + kubectl apply的可行性

这种方式完全可行,但需注意其局限性:

  • 失去Helm的Release管理能力:无法跟踪版本、无法使用helm rollback执行回滚操作
  • Helm钩子(如pre-install、post-upgrade)不会被触发
  • 若Chart包含依赖,需提前执行helm dependency build拉取依赖后再渲染模板
  • 仅适合无需Helm生命周期管理的简单部署场景

内容的提问来源于stack exchange,提问作者kostas.kapasakis

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.28 08:10:05