Skip to content

Commit a2b8686

Browse files
committed
chore(docs): Add more documentation
1 parent 468eafc commit a2b8686

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/ambient-providers/azure.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ Since you are using ambient credentials generated by your Azure AKS workload and
2222

2323
While system-assigned managed identity (MSI) is easy to use and enabled by default, user-assigned managed identity (UAMI) is the ***recommended identity type*** to use for your workload. UAMI identities can be shared with other AKS clusters and workloads, and offer more control over how the identity is used. If your app registration [requires a role assignment](#app-registration-assignment-requirement), you **must** use a UAMI. An MSI **cannot** be assigned to an app registration role.
2424

25+
### Quick Decision Guide
26+
27+
| Scenario | Recommended Identity Type |
28+
|----------|-------------------------|
29+
| Simple setup, single cluster | System-Assigned (MSI) |
30+
| Multiple clusters need same identity | User-Assigned (UAMI) |
31+
| App registration requires role assignment | User-Assigned (UAMI) - **Required** |
32+
| Production environments | User-Assigned (UAMI) |
33+
| Development/testing | Either (MSI for simplicity) |
34+
2535

2636
## System-Assigned Managed Identity (MSI)
2737

@@ -222,6 +232,12 @@ For more information about the assignment requirement for app registrations and
222232

223233
This troubleshooting section is intended for issues specific to the Azure AKS environment. If you do not see your issue in these troubleshooting steps, please see the troubleshooting steps in the [directory root](../../README.md#troubleshooting).
224234

235+
### Common Pitfalls
236+
237+
1. **Forgetting the `/.default` suffix** in scopes configuration
238+
1. **Using wrong object ID** - If using MSI, MSI uses kubelet identity, not the cluster identity
239+
1. **ServiceAccount mismatch** - If using UAMI, federated credentials must exactly match ServiceAccount name/namespace
240+
225241
### Determining Which Managed Identity Your AKS Workload is Using
226242

227243
Azure has documentation around [determining the managed identity a cluster is using](https://learn.microsoft.com/en-us/azure/aks/use-managed-identity#determine-which-type-of-managed-identity-a-cluster-is-using), but this section will confirm if your AKS workload is using UAMI or MSI for its managed identity.
@@ -278,6 +294,10 @@ NAME READY STATUS RESTARTS AGE LABELS
278294
command-issuer-86c4fdfb67-h4vqb 1/1 Running 0 105s app.kubernetes.io/instance=cert-manager-issuer,app.kubernetes.io/name=command-cert-manager-issuer,azure.workload.identity/use=true,pod-template-hash=86c4fdfb67
279295
```
280296

297+
#### Conclusion
298+
299+
If all of the above steps indicate your cluster has workload identity enabled, the pod is labeled to use workload identity, and the ServiceAccount is annotated with the UAMI client ID, your workload is most likely using **user-assigned managed identity**.
300+
281301
### Required Query Variable 'Resource' Is Missing
282302

283303
If you see the following error, this indicates your issuer / cluster issuer is missing a `scopes` field in its spec. DefaultAzureCredentials requires a valid scope, which should reference the [app registration](#azure-app-registration).

0 commit comments

Comments
 (0)