Azure 使用网关创建AKS群集的权限
考虑使用AKS,但在创建时存在一些问题/疑问 我可以使用以下CLI命令创建群集:Azure 使用网关创建AKS群集的权限,azure,azure-active-directory,azure-aks,Azure,Azure Active Directory,Azure Aks,考虑使用AKS,但在创建时存在一些问题/疑问 我可以使用以下CLI命令创建群集: az-aks创建--资源组myRG--名称aks--节点计数2--生成ssh密钥--启用托管标识--附加acr-myACR 这样做很好,没有任何问题。我想添加引起我问题的应用程序网关,并将其缩小到以下调用: az-aks创建--资源组myRG--名称aks--节点计数2--生成ssh密钥--启用托管标识--附加acr-myACR--网络插件azure 通过将--network plugin设置为Azure,它将失败
az-aks创建--资源组myRG--名称aks--节点计数2--生成ssh密钥--启用托管标识--附加acr-myACR
这样做很好,没有任何问题。我想添加引起我问题的应用程序网关,并将其缩小到以下调用:
az-aks创建--资源组myRG--名称aks--节点计数2--生成ssh密钥--启用托管标识--附加acr-myACR--网络插件azure
通过将--network plugin
设置为Azure,它将失败,并出现以下错误:
ValidationError: Directory permission is needed for the current user to register the application. For how to configure, please refer 'https://docs.microsoft.com/azure/azure-resource-manager/resource-group-create-service-principal-portal'. Original error: Insufficient privileges to complete the operation.
在调用中设置--debug
标志将显示以下内容:
urllib3.connectionpool : Starting new HTTPS connection (1): graph.windows.net:443
urllib3.connectionpool : https://graph.windows.net:443 "POST /1f141cfd-a6c5-4e9a-bf84-7116c141e5f4/applications?api-version=1.6 HTTP/1.1" 403 219
msrest.http_logger : Response status: 403
...
msrest.http_logger : {"odata.error":{"code":"Authorization_RequestDenied","message":{"lang":"en","value":"Insufficient privileges to complete the operation."},"requestId":"65e9cb16-4df1-4824-bd33-3ee6f691ed07","date":"2020-10-19T10:58:49"}}
所以我可以看出这是因为我没有在Azure AD中创建应用程序的权限
我无法访问Azure广告,因为它是公司广告,但我想知道以下几点:
urllib3.connectionpool : Starting new HTTPS connection (1): graph.windows.net:443
urllib3.connectionpool : https://graph.windows.net:443 "POST /1f141cfd-a6c5-4e9a-bf84-7116c141e5f4/applications?api-version=1.6 HTTP/1.1" 403 219
msrest.http_logger : Response status: 403
...
msrest.http_logger : {"odata.error":{"code":"Authorization_RequestDenied","message":{"lang":"en","value":"Insufficient privileges to complete the operation."},"requestId":"65e9cb16-4df1-4824-bd33-3ee6f691ed07","date":"2020-10-19T10:58:49"}}
谢谢您可以共享更多日志(403错误的上下文)吗?我测试了这个cmd,但在我的日志中找不到Azure AD app的注册操作。在这个问题上你还需要帮助吗?@AllenWu不确定是否诚实。正如我所说,如果我运行上面的命令,它在尝试在Azure AD中创建应用程序时会返回权限问题。但是,如果我在同一个命令中提供虚拟服务原则信息,例如
--服务原则1234--客户机机密1234
,它就会创建它。我已经试过了,虽然服务主体不存在,但似乎工作正常。您可以共享完整的cmd吗,其中包括——服务主体1234——客户端机密1234
?@AllenWuaz aks create——资源组rg——名称aks——节点计数1——生成ssh密钥——启用托管标识——附加acr myacr--网络插件azure—入口appgw—appgw名称myApplicationGateway—appgw子网前缀“10.2.0.0/16”--服务主体1234—客户端机密1234
。因此,如果没有服务主体
,它表示我没有在AD中创建应用程序的权限,但可以使用提供的不存在的服务主体