0

I have a created a private AKS cluster on Azure with a Linux VM that acts as self hosted agent\Bastion. The Linux box can access the AKS cluster via Kubectl. My issue is when I try to run a bash script in the Azure DevOps pipeline, I get permission denied.(The pipeline is using the selfhosted agent above) The Bash script runs a Helm command that get a list of the images that AKS will need. I want to use this list to pull images from an external Docker registry and push them to an internal Azure Container Registry and then use Helm to deploy.

Here is the Helm command in the script:

helm upgrade --install hosted-node -f helm_config.yaml myapp/hosted-app --dry-run -n dev | grep "image:" | awk "{print $2}" | uniq | sed "s/"//g" | grep "myapp" | sed "s/^.*image: //g"

The pipeline flow is like this:

  1. Get list of images needed

  2. Pull images from a private Docker repo

  3. Push images to ACR

  4. Run Helm (it will be configured to use images in the ACR)

How to I give the build agent the proper creds from the pipeline to run the above command.

Thanks, Ray

1 Answer 1

0

Tokens can now be used in your scripts for authentication.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.