istio - Istioctl 运算符 init 在 Azure Devops 管道中不起作用
问题描述
我的 AKS 群集在 Azure 中运行。我的 Azure DevOps 管道具有到此 AKS 群集的服务连接。我想从 Azure DevOps Pipeline 运行 istioctl 作为任务。我尝试添加 Istio 任务并想运行 istioctl operator init。
解决方案
我改为使用 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 "************************************************************"
推荐阅读
- mysql - 向表中插入值时出错:日期值不正确
- java - 如何在不使用服务器设置的情况下使用 java 从 Outlook 邮件中下载附件?
- python-3.x - 在 heroku 上托管 django 应用程序时遇到的问题
- javascript - reactjs中的socket.io客户端xhr轮询错误
- algorithm - 3皇后问题有通用术语公式吗?
- java - Hibernate select with AND condition and all AND in OR
- java - 如何将不可见的布局设置为永久可见?
- vagrant - Zeek Vagrant 设置
- django - 在 is_valid 之后拒绝表单帖子
- javascript - 来自工厂的对象根据访问位置返回不同的属性值