“如何链接Azure Active Directory”;服务负责人“;与AKS Kubernetes“合作”;服务帐户“;

“如何链接Azure Active Directory”;服务负责人“;与AKS Kubernetes“合作”;服务帐户“;,azure,azure-active-directory,azure-aks,Azure,Azure Active Directory,Azure Aks,目前,我正试图在Azure上的AKS kubernetes集群内部署应用程序 对于部署管道,我希望使用通过azure active directory管理的服务帐户(例如服务主体) 我已经通过Azure CLI创建了服务主体 在AKS集群内,如何正确地将此服务主体称为服务账户 我需要一个服务帐户而不是用户帐户的原因是,我想从我的devops管道使用它,而不需要登录,但仍然能够通过active directory管理它 目前,我正在使用默认服务帐户在名称空间内部署容器,这是可行的,但该帐户仅在名称

目前,我正试图在Azure上的AKS kubernetes集群内部署应用程序

对于部署管道,我希望使用通过azure active directory管理的服务帐户(例如服务主体)

我已经通过Azure CLI创建了服务主体

在AKS集群内,如何正确地将此服务主体称为服务账户

我需要一个服务帐户而不是用户帐户的原因是,我想从我的devops管道使用它,而不需要登录,但仍然能够通过active directory管理它

目前,我正在使用默认服务帐户在名称空间内部署容器,这是可行的,但该帐户仅在名称空间内已知,而不是集中管理

# This binding enables a cluster account to deploy on kubernetes
# You can confirm this with
# kubectl --as="${USER}" auth can-i create deployments
# See also: https://github.com/honestbee/drone-kubernetes/issues/8
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: default
  name: default-deploy
rules:
- apiGroups: ["extensions"]
  resources: ["deployments"]
  verbs: ["get","list","patch","update", "create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: role-default-deploy
  namespace: default
roleRef:
  kind: Role
  name: default-deploy
  apiGroup: rbac.authorization.k8s.io
subjects:
# working, the default account configured with deploy permissions
- name: default
  kind: ServiceAccount
  namespace: default
# works, if the service principal is configured as a User
- name: "111111-0000-1111-0000-********"
  apiGroup: rbac.authorization.k8s.io
  kind: User
# this does not work, the service principal is configured as a Service Account
- name: "111111-0000-1111-0000-********"
  apiGroup: rbac.authorization.k8s.io
  kind: ServiceAccount
我希望也能够通过RBAC配置服务帐户,但是我遇到以下错误:

The RoleBinding "role-default-deploy" is invalid: 
subjects[1].apiGroup: Unsupported value: 
"rbac.authorization.k8s.io": supported values: ""

你可以看一看,但首先,你应该是租户的管理员用户。你知道怎么做吗?对于AAD用户/组,目前是可能的(手动kubectl访问)(请参阅),但对于自动化,你不能使用它。。。这是一个公开的要求,我猜,看,和