How to Fix ACR Tasks Requests Error in Azure Kubernetes Service (AKS)

Ata 0 Reputation points
2024-03-29T17:05:13.8166667+00:00

I'm trying to deploy a test application to Azure Kubernetes Service using the Automated Deployments feature to generate a GitHub Actions workflow. However, when the workflow runs, it returns the following error:

ERROR: (TasksOperationsNotAllowed) ACR Tasks requests for the registry acrworkflow1711726763385 and *** are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance.

Code: TasksOperationsNotAllowed

Message: ACR Tasks requests for the registry acrworkflow1711726763385 and *** are not permitted. Please file an Azure support request at http://aka.ms/azuresupport for assistance.

Target: request

Error: Process completed with exit code 1.

I'm using a student account, and I'm new to Azure, so it doesn't help that their automated services are failing on me.

Below is my workflow file:

name: DailyGrind-Post-Service
    "on":
        push:
            branches:
                - main
        workflow_dispatch: {}
    env:
        AZURE_CONTAINER_REGISTRY: acrworkflow1711726763385
        More envs...
    jobs:
        buildImage:
            permissions:
                contents: read
                id-token: write
            runs-on: ubuntu-latest
            steps:
                - uses: actions/checkout@v3
                - uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
                  name: Azure login
                  with:
                    client-id: ${{ secrets.AZURE_CLIENT_ID }}
                    subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
                    tenant-id: ${{ secrets.AZURE_TENANT_ID }}
                - name: Build and push image to ACR
                  run: az acr build --image ${{ env.CONTAINER_NAME }}:${{ github.sha }} --registry ${{ env.AZURE_CONTAINER_REGISTRY }} -g ${{ env.ACR_RESOURCE_GROUP }} -f ./Post-Service/Dockerfile ./
        deploy:
            permissions:
                actions: read
                contents: read
                id-token: write
            runs-on: ubuntu-latest
            needs:
                - buildImage
            steps:
                - uses: actions/checkout@v3
                - uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
                  name: Azure login
                  with:
                    client-id: ${{ secrets.AZURE_CLIENT_ID }}
                    subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
                    tenant-id: ${{ secrets.AZURE_TENANT_ID }}
                - uses: azure/use-kubelogin@v1
                  name: Set up kubelogin for non-interactive login
                  with:
                    kubelogin-version: v0.0.25
                - uses: azure/aks-set-context@v3
                  name: Get K8s context
                  with:
                    admin: "false"
                    cluster-name: ${{ env.CLUSTER_NAME }}
                    resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }}
                    use-kubelogin: "true"
                - uses: Azure/k8s-deploy@v4
                  name: Deploys application
                  with:
                    action: deploy
                    images: ${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.CONTAINER_NAME }}:${{ github.sha }}
                    manifests: ${{ env.DEPLOYMENT_MANIFEST_PATH }}
                    namespace: namespace-workflow-1711726763385

How can I fix this error?

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,114 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 21,405 Reputation points
    2024-03-30T01:55:58.4+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    As discussed in this thread, It's possible that certain operations, such as ACR tasks, are restricted for trial accounts.

    https://learn.microsoft.com/en-us/answers/questions/1530524/how-to-fix-(tasksoperationsnotallowed)-acr-tasks-r

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is 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.