简体   繁体   English

将 AAD 连接到具有

[英]connect AAD to existing AKS that has

Working with Azure, we started with AKS last year.与 Azure 合作,我们从去年开始使用 AKS。 On creation of the AKS clusters we use, we checked what needed to be done up front to enable rbac at a later moment and we then thought that setting 'rbac' to 'enabled' was the only thing we needed.在创建我们使用的 AKS 集群时,我们检查了在稍后启用 rbac 需要预先完成的工作,然后我们认为将“rbac”设置为“启用”是我们唯一需要的事情。 This results in the following:这导致以下结果:

在此处输入图片说明

Now we're trying to implement rbac integration of AKS with AAD, but I read some seemingly conflicting pre-requisites.现在我们正在尝试实现 AKS 与 AAD 的 rbac 集成,但我阅读了一些看似相互矛盾的先决条件。 Some say that in order to integrate AAD and AKS, you need rbac enabled at cluster creation.有人说为了集成 AAD 和 AKS,您需要在创建集群时启用 rbac。 I believe we have set that correct, looking at the picture above.我相信我们已经设置正确,看看上面的图片。 But then in theAzure docs , it is mentioned that you need to create a cluster and add some AAD-integration keys for the client and server applications.但是在Azure 文档中,提到您需要创建一个集群并为客户端和服务器应用程序添加一些 AAD 集成密钥。

My question is actually two-fold:我的问题实际上有两个方面:

  1. when people say you need rbac enabled in your aks cluster during creation do they actually mean you should select the 'rbac:enabled' box AND make sure you create the AAD-related applications up front and also configure these during cluster creation ?当人们说您need rbac enabled in your aks cluster during creation他们实际上是否意味着您should select the 'rbac:enabled' box AND make sure you create the AAD-related applications up front and also configure these during cluster creation
  2. Is there a way to setup the AKS-AAD rbac connection on a cluster that has rbac:enabled but misses the aadProfile configuration?有没有办法在已rbac:enabled但错过 aadProfile 配置的群集上设置 AKS-AAD rbac 连接?

I believe we indeed need to re-create all our clusters, but I want to know for sure by asking here as it's not 100% clear to me from what I've read online (also here at stack exchange) and it's going to be an awful lot of work.我相信我们确实需要重新创建我们所有的集群,但我想通过在这里询问来确定,因为我在网上阅读的内容(也在堆栈交换中)对我来说并不是 100% 清楚,而且它将是大量的工作。

For all of your requirements, you only need to make sure the RBAC enabled for your AKS cluster and it only can enable in the creation time.对于您的所有要求,您只需确保为您的 AKS 群集启用了 RBAC,并且它只能在创建时启用。 Then you can update the credential of the existing AKS AAD profile like this:然后,您可以像这样更新现有 AKS AAD 配置文件的凭据:

Before update:更新前:

在此处输入图片说明

CLI update command: CLI 更新命令:

az aks update-credentials -g yourResourceGroup -n yourAKSCluster --reset-aad --aad-server-app-id appId --aad-server-app-secret appSecret --aad-client-app-id clientId --aad-tenant-id tenantId

After update:更新后:

在此处输入图片说明

  1. yes, that is correct对,那是正确的
  2. no, there is no way of doing that.不,没有办法做到这一点。 you need to recreate.你需要重新创建。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM