Hi @Krister Borge (Innleid) , sorry to hear you're having issues! We can try a few troubleshooting steps. If they don't work we can open a support ticket for you!
Please try the following steps and let me know your results:
- Check if the service principal has the correct permissions to access the Key Vault. Make sure that the service principal has the "Key Vault Secrets User" role assigned to it in the resource group where the Key Vault is located.
- Verify that the service principal is correctly authenticated. You can do this by attaching to the pod and running the
az
command to list the secrets. If this works, then the authentication is correct. - Check if the RBAC permissions are correctly set up. Make sure that the service principal has the correct permissions to access the Key Vault. You can try assigning the "Key Vault Administrator" role to the service principal to see if this resolves the issue.
- If the above steps do not work, you can try using Managed Identity for your application. This will allow your application to authenticate with Azure services without the need for a service principal. You can follow the steps in the following document to enable Managed Identity for your application: https://docs.microsoft.com/en-us/azure/aks/use-managed-identity
Please let me know if you have any questions and I can help you further.
If this answer helps you please mark "Accept Answer" so other users can reference it.
Thank you,
James