简体   繁体   English

Azure AKS 用户凭据登录到 K8 仪表板和 RBAC 内置角色

[英]Azure AKS User Credentials Login to K8 Dashboard and RBAC Built-in Roles

According to the documentation , Azure Kubernetes Service Cluster User Role allows access to Microsoft.ContainerService/managedClusters/listClusterUserCredential/action API call only.根据文档,Azure Kubernetes 服务集群用户角色允许访问 Microsoft.ContainerService/managedClusters/listClusterUserCredential/action ZDB974238714CA8DE634A7CE1D083A1。

My user is part of an AD group that has Azure Kubernetes Service Cluster User Role permissions on the AKS cluster and all the cluster role and cluster role bindings have been applied via kubectl .我的用户是具有Azure Kubernetes Service Cluster User Role权限的 AKS 集群的 AD 组的一部分,并且所有集群角色和集群角色绑定都已通过kubectl应用。

I can double check and verify that access to dashboard and permissions work with these steps:我可以通过以下步骤仔细检查并验证对仪表板和权限的访问:

 1. az login
 2. az aks get-credentials --resource-group rg --name aks
 3. kubectl proxy
 4. Open web connection
 5. Get prompt on terminal to login via device code flow
 6. Return to web connection on dashboard
 7. I can correctly verify that my permissions apply, 
 i.e. deleting a job does not work and this falls in line with my
    kubectl clusterrole bindings to the Azure AD group.

However when I try to use the az aks browse command to open the browser automatically like this, ie without kubectl proxy :但是,当我尝试使用az aks browse命令像这样自动打开浏览器时,即没有kubectl proxy

 1. az login
 2. az aks get-credentials --resource-group rg --name aks
 3. az aks browse --resource-grouprg --name aks

I keep getting the following error:我不断收到以下错误:

The client 'xxx' with object id 'yyyy' does not have authorization to perform action 
'Microsoft.ContainerService/managedClusters/read' over scope 
'/subscriptions/qqq/resourceGroups/rg/providers/Microsoft.ContainerService/managedClusters/aks' 
or the scope is invalid. If access was recently granted, please refresh your credentials.

A dirty solution was to apply Reader role on the AKS cluster for that AD group - then this issue goes away but why does az aks browse require Microsoft.ContainerService/managedClusters/read permission and why is that not included in Azure Kubernetes Service Cluster User Role ?一个dirty的解决方案是在该 AD 组的 AKS 群集上应用Reader角色 - 然后这个问题就消失了,但为什么az aks browse需要Microsoft.ContainerService/managedClusters/read权限,为什么Azure Kubernetes Service Cluster User Role中不包含该权限?

What is happening here?这里发生了什么?

Currently, the command目前,该命令

az aks browse --resource-grouprg --name aks isn't working with the more recent version of AKS, you can find the full details here. az aks browse --resource-grouprg --name aks不适用于更新版本的 AKS,您可以在此处找到完整的详细信息。

https://github.com/MicrosoftDocs/azure-docs/issues/23789 https://github.com/MicrosoftDocs/azure-docs/issues/23789

Also, your current problem might also be that your user XXX doesn't have the right IAM access level at the Subscription/ResourceGroup level.此外,您当前的问题还可能是您的用户 XXX 在 Subscription/ResourceGroup 级别没有正确的 IAM 访问级别。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 网站贡献者无法管理每个Azure RBAC的SSL证书:内置角色 - Website Contributor not able to manage SSL certificates per Azure RBAC: Built-in roles azure aks将在k8集群中运行的mongodb备份到本地文件或azure存储中 - azure aks take backup of mongodb running in k8 cluster to local file or azure storage Azure RBAC 自定义角色 - Azure RBAC Custom Roles 牧场主/ K8 /天蓝色/ Kubectl - Rancher / k8 / azure / Kubectl Azure Java SDK - 如何检索用户的 RBAC 角色 - Azure Java SDK - how to retrieve RBAC roles of an User 使用什么 Azure RBAC API 来获取特定用户的角色? - What Azure RBAC API to use for getting roles for a specific user? 使用默认的(内置)asp.net用户注册并使用我自己的数据库登录已部署的azure网站 - Use default (built-in) asp.net user registration and login in deployed azure website with my own database 使用RBAC角色“虚拟机用户登录”的Azure VM登录 - Azure VM Login using RBAC Role 'Virtual Machine User Login' 配置了 Azure AD RBAC 的 Azure DevOp Pipelines 身份验证到 AKS? - Azure DevOp Pipelines authentication to AKS with Azure AD RBAC configured? Azure RBAC - 模块化和自定义角色继承 - Azure RBAC - modularity and custom roles inheritance
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM