【问题标题】:Istioctl operator init not working from Azure Devops pipelineIstioctl 运算符 init 在 Azure Devops 管道中不起作用
【发布时间】:2021-06-03 05:43:54
【问题描述】:

我的 AKS 群集在 Azure 中运行。我的 Azure DevOps 管道具有到此 AKS 群集的服务连接。我想从 Azure DevOps Pipeline 运行 istioctl 作为任务。我尝试添加 Istio 任务并想运行 istioctl operator init。

操作员初始化步骤失败。可以请一些帮助。

【问题讨论】:

  • 你能至少分享一下错误吗?
  • 添加了带有命令和错误消息的屏幕截图。
  • 你用的是什么版本的 istioctl?
  • 1.9.5 是我使用的 Istio 版本。
  • 看起来您正在为 Istio 使用 3rd 方任务:github.com/TsuyoshiUshio/KubernetesTask。自述文件提到了一个 prereq 步骤(下载器)。也许您的下载任务不兼容。我认为你可以只使用 bash 任务。

标签: istio azure-aks


【解决方案1】:

我改为使用 Azure CLI 任务而不是第三方 Istio 任务。我可以通过 Azure Pipeline 在 AKS 集群上安装 Istio。在运行之前在设置级别做的几件事 1) 下载 Istio 2) operator init 等是 1) Azure 订阅需要在行内脚本中设置,然后 2) 上下文到资源组和我的 aks 集群 3) 转换了我的到 yaml 的经典管道。 ..这里是通过 azure 管道安装 istio 的工作 yaml 管道,用于 uat、staging、prod 等上层环境,我们不需要一一运行命令。感谢使用 shell 而不是使用第 3 个的想法派对。

 trigger: none 

 jobs:
 - job: Job_1
   displayName: Agent job 1
   pool:
     vmImage: ubuntu-20.04
   steps:
   - checkout: self
   - task: AzureCLI@2
     displayName: Azure CLI [ 1 ]
     inputs:
       connectedServiceNameARM: $(DEV-CONN-SVC-NAME-ARM)
       scriptType: bash
       scriptLocation: inlineScript
       inlineScript: >-
    
         az account set --subscription $(DEV-SUBSCRIPTION)
         az aks get-credentials --resource-group $(DEV-RESOURCE-GROUP) --name $(DEV-RESOURCE-NAME)

         ls -lrt

         pwd

         curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.9.1 sh -

         cd istio-1.9.1

         export PATH=$PWD/bin:$PATH

         echo "run istioctl version"

         echo "************************************************************"

         istioctl version

         echo "************************************************************"

         echo "run istioctl operator init"

         echo "************************************************************"

         istioctl operator init

         echo "************************************************************"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-07
    • 2020-08-06
    • 2020-04-02
    • 1970-01-01
    相关资源
    最近更新 更多