无法删除 AKS 群集

Unable to delete AKS cluster

AKS(Azure 的托管 Kubernetes 服务)发布后,我决定尝试一下。我没有使用 Azure 的经验(除了管理 Office365 和使用 Azure AD),所以我只是从介绍博客 post.

复制粘贴命令

很遗憾,创建集群失败并出现以下错误:

$ az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value ~/.ssh/id_rsa.pub

Deployment failed. Correlation ID: cbb78191-73a0-4c78-aaed-f991fdae5f4f. unable to create resource group. error: resources.ProvidersClient#Register: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailed" Message="The client '761da5e6-d1ed-41b4-8cb5-3c60d8ae1243' with object id '761da5e6-d1ed-41b4-8cb5-3c60d8ae1243' does not have authorization to perform action 'Microsoft.Compute/register/action' over scope '/subscriptions/5aedaa24-356a-4b17-98b3-d09129d00f4d'."

但是,az aks list 确实 显示集群已创建。由于错误我想删除集群,但是删除也失败了!

$ az aks delete --resource-group MyResourceGroup --name MyManagedCluster

Are you sure you want to perform this operation? (y/n): y Deployment failed. Correlation ID: 64fd7054-3f4b-4dd7-99dc-6978233661be. failed to delete resource group: resources.ProvidersClient#Register: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailed" Message="The client '761da5e6-d1ed-41b4-8cb5-3c60d8ae1243' with object id '761da5e6-d1ed-41b4-8cb5-3c60d8ae1243' does not have authorization to perform action 'Microsoft.Compute/register/action' over scope '/subscriptions/5aedaa24-356a-4b17-98b3-d09129d00f4d'."

我多次尝试从 cli 和 Azure 门户中删除。每次由于授权明显不足而失败,尽管 Portal 声称我实际上是集群的所有者。

所以,我遇到了一个不需要的集群。有什么想法吗?

要使用 AKS,您需要向 Microsoft.Compute 和 Microsoft.Network 资源提供商注册。 您可以在 Azure 门户的订阅边栏选项卡中执行此操作:

来自 Azure cli,

az provider register -n Microsoft.Compute
az provider register -n Microsoft.Network

请注册以上资源提供者,删除AKS资源后重新创建。

A​​KS 团队正在努力正确暴露此错误消息。