Gunasekar Desaiyan
Gunasekar Desaiyan

Reputation: 41

Istioctl operator init not working from Azure Devops pipeline

I have my AKS cluster running in Azure. I have my Azure DevOps pipeline having a service connection to this AKS cluster. I would like to run istioctl from Azure DevOps Pipeline as taks. I tried to add Istio task and wanted to run istioctl operator init.

Operator init step is failed. Can some please help. enter image description here enter image description here

Upvotes: 0

Views: 331

Answers (1)

Gunasekar Desaiyan
Gunasekar Desaiyan

Reputation: 41

I changed to use Azure CLI task instead of third party Istio task. I am able to install Istio via Azure Pipeline on an AKS cluster. Few things to do at setup level before running 1) download Istio 2) operator init, etc are 1) Azure subscription need to be set in the in line script and then 2) context to the resource group and my aks cluster 3) converted my classic pipeline to yaml. .. and here is the working yaml pipeline for installing istio via azure pipeline for upper environments like uat, staging, prod where we don't need to run commands one by one.. thanks for the idea of use shell and not using the 3rd party.

 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 "************************************************************"

Upvotes: 2

Related Questions