Deploy to AKS using Github Actions

Kopl 166 Reputation points
2022-07-25T13:17:20.21+00:00

Hello community,

I am trying to setup a CI/CD pipeline using Github Actions to deploy to AKS.

I have been following this tutorial here: https://learn.microsoft.com/en-us/learn/modules/aks-deployment-pipeline-github-actions/10-exercise-deploy-workflow

Here is the authentication process I am using:

      - name: Azure Login     
        uses: Azure/login@v1.4.5     
        with:     
          creds: ${<!-- -->{ secrets.AZURE_CREDENTIALS }}     
     
      - name: Get AKS Credentials     
        uses: Azure/aks-set-context@v3     
        with:     
          # Azure resource group name     
          resource-group: <RESOURCE_GROUP>     
          # Azure connected cluster name     
          cluster-name: <CLUSTER_NAME>     
     

However, I get the following error:

WARNING: the azure auth plugin is deprecated in v1.22+, unavailable in v1.25+; use https://github.com/Azure/kubelogin instead.

To learn more, consult https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins

To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code <CODE> to authenticate.

Could you please help? Do you have an updated process for getting Github Actions to connect with AKS?

Thanks!

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,447 questions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. srbhatta-MSFT 8,586 Reputation points Microsoft Employee
    2022-07-27T08:51:58.403+00:00

    Hello @Kopl ,
    Welcome to Microsoft QnA.
    Apologies for the delay in response. The reason why you haven't yet received any responses on this thread is because GitHub Actions is as of now not supported on Microsoft QnA Platform.

    However, after doing some research, here is something relevant that I have found which might be the cause behind this error. Please check the below.

    Starting with 1.23 AKS will follow upstream kubernetes and deprecate in-tree azure authentication which is marked for deprecation to be replaced with 'exec'. If you are using Azure CLI or Azure clients, AKS will download kubelogin for users automatically. If outside of Azure CLI, users need to download and install kubelogin in order to continue to use kubectl with AAD authentication

    Please go through #2728 and reference release 2022-05-22 for more details.
    Do let me know if this helps?

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.