During the setup of a AKS cluster (with terraform, but I don't think it's relevant in this context) I want to enable and configure the flux extension.
Flux should, of course, pull the yaml-files from some Azure DevOps Repo. In my case, I am trying to use a Service Principal to authenticate against Devops. I gave already the Reader rights (I tried also Contributor) on the Repo. I created a client secret and as the username I used the appliation (client) ID of the service principal.
In the flux configuration I tried to add this values as HTTPS User and HTTPS Key.
I tried also to add these credentials as secrets in Kubernetes and configured flux to use this secret, but unsuccessful.
kubectl create secret generic spsecret --namespace=fluxtest --from-literal=username=<CLIENT_ID> --from-literal=password=<SECRET>
This is the message I am getting.
Does anybody see what am I missing here? Did I misunderstood the whole concept? If you need more information, please ask.
It's unfortunately not possible to do it with a service principal. I realized it with a technical AD user (service account). Once a provision the AKS with Flux, I copy the public key created by flux and paste it into the SSH keys in Azure Devops.