无法使用正确的权限创建服务主体

时间:2018-01-16 21:06:45

标签: azure azure-active-directory userprincipal azure-kubernetes

我试图运行命令:

az acs create --orchestrator-type kubernetes --resource-group myResourceGroup --agent-count 1 --name  myK8SCluster
--generate-ssh-keys

哪个应该生成主体,然后生成kubernetes集群。

但是有错误:

Could not create a service principal with the right permissions. Are you an Owner on this project? Deployment failed. Correlation ID: 1e8e87ee-f01e-4394-8356-cc4956b44b5e. {   "error": {
    "code": "BadRequest",
    "message": "The Service Principal in ServicePrincipalProfile could not be validated. Please see https://aka.ms/acs-sp-help for more details. (The client 'ffc0ce03-2ba5-46e7-b0dd-99a7980da24b' with object id 'ffc0ce03-2ba5-46e7-b0dd-99a7980da24b' does not have authorization to perform action 'Microsoft.Authorization/roleAssignments/read' over scope '/subscriptions/b9a29aba-5bcd-45dd-99e5-8971de90d595/resourceGroups/myResourceGroup/providers/Microsoft.Authorization'.)" } }

我的azure帐户有管理员角色,我的目录角色是全局管理员,我是唯一使用此azure帐户的人。

我试图删除.azure文件夹的内容无济于事。我在Windows 10上。

1 个答案:

答案 0 :(得分:1)

您的登录帐户应具有 ID Location DO pH Salinity 1 a1 x1 7.3 8.1 32.7 2 b2 x2 7.6 8.3 31.2 Owner个订阅角色。

您可以在Azure门户上查看它。

enter image description here

此外,您可以授予sp myK8sCluster Contributor角色并再次检查。