이 문서에서는 AKS(Microsoft Azure Kubernetes Service) 클러스터를 시작, 업그레이드 또는 확장하려고 할 때 발생하는 OperationNotAllowed 오류를 해결하는 방법을 설명합니다.
필수 조건
증상
다음 오류 메시지 중 하나를 포함하는 여러 증상이 발생합니다.
작업이 허용되지 않습니다. 다른 작업(<operation-name>)이 진행 중입니다. 새 작업을 시작하기 전에 작업이 완료될 때까지 기다려 주세요. 자세한 내용은 를 참조하세요 https://aka.ms/aks-pending-operation .
또는 에이전트 풀에 대한 작업인 경우 다음을 수행합니다.
작업이 허용되지 않습니다. 다른 agentpool 작업(<operation-name>)이 진행 중입니다. 새 작업을 시작하기 전에 완료될 때까지 기다려 주세요. 자세한 내용은 를 참조하세요 https://aka.ms/aks-pending-operation .
또는
관리형 클러스터 작업은 허용되지 않습니다. 에이전트 풀(agent-pool-name)에서 다른 작업(<>operation-name<>)이 진행 중입니다. 새 작업을 시작하기 전에 완료될 때까지 기다려 주세요. 자세한 내용은 를 참조하세요 https://aka.ms/aks-pending-operation .
원인
일부 작업은 실행하는 데 시간이 소요됩니다. 이러한 작업은 완료되지 않은 경우 다른 작업을 차단합니다.
해결 방법 1: 작업이 완료될 때까지 기다립니다.
다음 예제에서는 클러스터가 다른 클라이언트에서 업데이트되는 동안 한 클라이언트에서 클러스터를 시작하면 "OperationNotAllowed" 오류가 발생합니다.
az aks start -n <myAKSCluster> -g <myResourceGroup>
(OperationNotAllowed) managed cluster is in Provisioning State(Updating) and Power State(Running), starting cannot be performed The previous operation started at '2024-02-21T13:33:55Z' and elapsed time is: '00:00:00' (RFC3339 format)
Code: OperationNotAllowed
Message: managed cluster is in Provisioning State(Starting) and Power State(Running), starting cannot be performed The previous operation started at '2024-02-21T13:33:55Z' and elapsed time is: '00:00:00' (RFC3339 format)
이러한 문제를 해결하려면 차단 작업이 완료될 때까지 기다리거나 az aks operation-abort 명령을 사용하여 장기 실행 작업을 중단해 볼 수 있습니다.
해결 방법 2: 두 개의 유사한 작업을 연속으로 수행하지 않는지 확인합니다.
이미 원하는 상태인 클러스터에서 작업을 실행하면 "OperationNotAllowed" 오류가 발생합니다.
예를 들어 클러스터가 이미 중지된 경우 다른 중지 작업을 실행하면 이 오류가 트리거됩니다.
az aks stop -n <myAKSCluster> -g <myResourceGroup>
(OperationNotAllowed) managed cluster is not currently running, stopping cannot be performed; The stop operation started at '2024-02-13T15:01:15Z' and elapsed time is: '7 days and 01:16:37' (RFC3339 format)
Code: OperationNotAllowed
Message: managed cluster is not currently running, stopping cannot be performed; The stop operation started at '2024-02-13T15:01:15Z' and elapsed time is: '7 days and 01:16:37' (RFC3339 format)
이러한 문제를 해결하려면 클러스터를 다시 중지하기 전에 시작합니다.
해결 방법 3: 작업을 시도하기 전에 현재 클러스터 상태 가져오기
작업을 시도하기 전에 클러스터의 현재 상태를 확인할 수도 있습니다. 문제를 진단하려면 다음 az aks show 명령을 실행하여 클러스터에 대한 자세한 상태를 검색합니다.
az aks show --resource-group <myResourceGroup> --name <myAKSCluster> --output table
그런 다음, 다음 표를 사용하여 명령 결과에 따라 적절한 작업을 수행합니다. (명령 출력 테이블의 ProvisioningState 열을 참조 az aks show 하세요.)
| 명령 결과 | 작업 |
|---|---|
| 클러스터가 적극적으로 업데이트되고 있습니다. | 작업이 완료될 때까지 기다립니다. |
| 클러스터 업데이트 실패 | 활동 로그에서 실패 이유를 찾습니다. |
| 클러스터 업데이트 성공 | 이전에 실패한 시작, 크기 조정 또는 기타 작업을 다시 시도합니다. |
해결 방법 4: 작업 다시 시도
일시적인 문제로 인해 작업이 실패하고 일관성이 없는 상태로 남아 있는 시나리오가 있습니다.
다음 예제에서는 노드 풀 <에이전트 풀> 에서 삭제가 실행되었지만 해당 삭제는 아직 완료되지 않았습니다. 삭제가 시작되면 리소스에 대해 다른 작업을 수행할 수 없습니다. 따라서 "OperationNotAllowed" 오류로 인해 크기 조정 작업이 실패합니다.
{
"code": "OperationNotAllowed",
"details": null,
"message": "Unable to perform 'Scaling' operation on 'agentpool' since deletion was issued on 'agentpool'. The only allowed operation is deletion once deletion has started. The delete operation started at '2024-01-09T04:29:12Z' and elapsed time is: '00:30:28' (RFC3339 format)",
"subcode": ""
}
이러한 문제를 해결하려면 삭제가 완료될 때까지 기다립니다. 몇 시간 후에 완료되지 않은 경우 나중에 삭제를 다시 시도합니다.
도움을 요청하십시오.
질문이 있는 경우 Azure 커뮤니티 지원을 요청할 수 있습니다. Azure 피드백 커뮤니티에 제품 피드백을 제출할 수도 있습니다.