You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Customer intent: As an Azure Kubernetes user, I want to troubleshoot a missing or invalid service principal so that I can successfully create an Azure Kubernetes Service (AKS) cluster.
@@ -13,9 +13,16 @@ ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool
13
13
14
14
This article discusses how to troubleshoot a service principal that isn't found or is invalid when you try to create a Microsoft Azure Kubernetes Service (AKS) cluster.
15
15
16
+
## Prerequisites
17
+
18
+
<!-- Added: Note on Azure CLI version -->
19
+
Ensure you are using Azure CLI version 2.0.81 or later to run the commands in this article.
20
+
16
21
## Cause
17
22
18
-
When you create an AKS cluster, AKS requires a service principal or managed identity to manage resources on your behalf. By default, AKS uses a System-assigned managed identity. If you prefer to use a service principal instead, be aware that AKS does not automatically create one for you. You’ll have to provide your own service principal and reference it during cluster creation by [these instructions](/azure/aks/kubernetes-service-principal).
23
+
When you create an AKS cluster, AKS requires a service principal or managed identity to manage resources on your behalf. By default, AKS uses a System-assigned managed identity. If you prefer to use a service principal instead, be aware that AKS does not automatically create one for you. You’ll have to provide your own service principal and reference it during cluster creation by [these instructions](https://learn.microsoft.com/en-us/azure/aks/kubernetes-service-principal?tabs=azure-cli).
24
+
<!-- Added: Recommendation for managed identities -->
25
+
While service principals are supported for AKS authentication, consider using system-assigned managed identities, which simplify credential management and are the default for new clusters.
19
26
20
27
Additionally, when you create a service principal, make sure that it's propagated across all regions by Microsoft Entra ID. If this propagation takes too long, the cluster might fail validation because AKS can't locate the service principal.
21
28
@@ -24,6 +31,8 @@ Additionally, when you create a service principal, make sure that it's propagate
24
31
Make sure that there's a valid, findable service principal. To do this, use one of the following methods:
25
32
26
33
- When you create an AKS cluster, consider using an existing service principal that has already propagated across regions. Although there’s no direct way to verify the propagation status, you can verify functionality by using a previously deployed service principal. Alternatively, if you're using a new principal, allow 5-10 minutes for the principal to propagate before you start the cluster creation.
34
+
<!-- Added: Command to verify service principal status -->
35
+
- To confirm the service principal is ready, run `az ad sp show --id <appId>` and verify the output before creating the AKS cluster.
27
36
28
37
- If you use automation scripts, add time delays between service principal creation and AKS cluster creation. We recommend a delay of 5 to 10 minutes.
0 commit comments