Edit

Share via


AKSOperationPreempted or AKSOperationPreemptedByDelete error when performing a new operation

This article discusses how to identify and resolve the AKSOperationPreempted or AKSOperationPreemptedByDelete error that might occur when you try to perform a new operation but it has been preempted by another operation on a Microsoft Azure Kubernetes Service (AKS) cluster.

Symptoms

When you try to perform a new operation on an AKS cluster, you receive one of the following error messages:

  • Code: "AKSOperationPreempted"

    Message: "This operation has been preempted by another operation with ID <operation ID>"

    This message indicates that the operation has been preempted by another operation, and the GUID for the new operation is given in the error message.

  • Code: "AKSOperationPreemptedByDelete"

    Message: "This operation has been preempted by Deleting operation."

    This message indicates that the operation has been preempted by a delete operation.

Cause

This error usually occurs when an in-progress operation is interrupted by a subsequent operation that was issued before the in-progress operation is finished. The error will indicate the subsequent operation, which can be a delete or any other operation.

Solution

To resolve this issue, use one of the following methods. Once there are no operations running, you can try to run your operation again.

  • Wait for the previous operation to complete.

    You can check the status of the operation using the ID given in the error message with the follwing command:

    az aks operation show \
        --resource-group myResourceGroup \
        --name myCluster \
        --operation-id "<operation-id>"
    
  • Run an abort command to stop the previous operation.

    For more information about how to abort an operation, see Terminate a long running operation on an Azure Kubernetes Service (AKS) cluster.

More information

General troubleshooting of AKS cluster creation issues