<p>Now I want to integrate Azure AD with AKS as <a href="https://learn.microsoft.com/en-us/azure/aks/aad-integration" rel="nofollow noreferrer">Integrate Azure Active Directory with Azure Kubernetes Service</a>. </p>

<p>It is necessary to set these attributes to the AKS cluster:</p>

<ul>
<li>aad-server-app-id</li>
<li>aad-server-app-secret</li>
<li>aad-client-app-id</li>
<li>aad-tenant-id</li>
</ul>

<p>It can do like this:</p>

<pre><code>az aks create \
  --resource-group myResourceGroup \
  --name myAKSCluster \
  --generate-ssh-keys \
  --aad-server-app-id b1536b67-29ab-4b63-b60f-9444d0c15df1 \
  --aad-server-app-secret wHYomLe2i1mHR2B3/d4sFrooHwADZccKwfoQwK2QHg= \
  --aad-client-app-id 8aaf8bd5-1bdd-4822-99ad-02bfaa63eea7 \
  --aad-tenant-id 72f988bf-0000-0000-0000-2d7cd011db47
</code></pre>

<p>From the <a href="https://learn.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest" rel="nofollow noreferrer">az aks</a> command list I didn't find an <code>edit</code> feature. So if I have created an AKS cluster, isn't there a way to set the <code>Azure AD</code> application IDs on the Kubernetes cluster?</p>

Jingqiang Zhang
<blockquote>
  <p>Unfortunately enabling RBAC on existing clusters is not supported at
  this time. You will need to explicitly create new clusters.</p>
</blockquote>

<p>There is something you would want to know when you start to work with AKS. Follow this <a href="https://learn.microsoft.com/en-us/azure/aks/troubleshooting#i-am-trying-to-enable-rbac-on-an-existing-cluster-can-you-tell-me-how-i-can-do-that" rel="nofollow noreferrer">link</a> to see more details.</p>
