AKS + ACR - Flux gives me err="requesting tags: when I try automatic deployments

207 Views Asked by At

I'm using AKS with ACR and it works fine when I specify an image (update the Deployment .yaml file manually to update the image version name).

But when I try to do this automatically using image tag filtering: https://docs.fluxcd.io/en/latest/references/fluxctl/

Using:

fluxctl policy `
    --k8s-fwd-ns="flux" `
    --workload=default:deployment/myclient `
    --tag-all="mybranch_*"

which adds:

fluxcd.io/tag.myclient: glob:mybranch_*

When I do:

kubectl -n flux logs <podId>

I get this error:

 err="requesting tags: Get \"https://my_azure_acr/v2/clients/myclient/tags/list\": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information."

Any idea why?

1

There are 1 best solutions below

0
On

It seems you don't have permission to control the ACR. And as it shows here, you need to add a secret to authenticate to the ACR for Flux.