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
Copy file name to clipboardExpand all lines: articles/dev-spaces/faq.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ When using Visual Studio to prepare your project, you have the option of enablin
74
74
75
75
## Can I use pod managed identities with Azure Dev Spaces?
76
76
77
-
Currently, Azure Dev Spaces does not support using [pod managed identities][aks-pod-managed-id] on AKS clusters with Azure Dev Spaces enabled. If you have pod managed identities installed and would like to uninstall it, you can find more details in the [uninstall notes][aks-pod-managed-id-uninstall].
77
+
Yes, you can use [pod managed identities][aks-pod-managed-id] on AKS clusters with Azure Dev Spaces enabled, but there are [additional configuration steps][dev-spaces-pod-managed-id-steps] after you enable Azure Dev Spaces on your cluster with pod managed identities. If you have pod managed identities installed and would like to uninstall it, you can find more details in the [uninstall notes][aks-pod-managed-id-uninstall].
78
78
79
79
## Can I use Azure Dev Spaces with multiple microservices in an application?
80
80
@@ -93,6 +93,7 @@ In Visual Studio, it is possible to configure .NET Core solutions for debugging
Copy file name to clipboardExpand all lines: articles/dev-spaces/troubleshooting.md
+109-2Lines changed: 109 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ You can also try deleting the controller:
34
34
azds remove -g <resource group name> -n <cluster name>
35
35
```
36
36
37
-
Use the Azure Dev Spaces CLI to delete a controller. It’s not possible to delete a controller from Visual Studio. You also can't install the Azure Dev Spaces CLI in the Azure Cloud Shell so you can't delete a controller from the Azure Cloud Shell.
37
+
Use the Azure Dev Spaces CLI to delete a controller. It's not possible to delete a controller from Visual Studio. You also can't install the Azure Dev Spaces CLI in the Azure Cloud Shell so you can't delete a controller from the Azure Cloud Shell.
38
38
39
39
If you don't have the Azure Dev Spaces CLI installed, you can first install it using the following command then delete your controller:
40
40
@@ -89,7 +89,7 @@ To fix this issue, update your installation of the [Azure CLI](/cli/azure/instal
89
89
90
90
### Error "Unable to reach kube-apiserver"
91
91
92
-
You might see this error when Azure Dev Spaces is unable to connect to your AKS cluster's API server.
92
+
You might see this error when Azure Dev Spaces is unable to connect to your AKS cluster's API server.
93
93
94
94
If access to your AKS cluster API server is locked down or if you have [API server authorized IP address ranges](../aks/api-server-authorized-ip-ranges.md) enabled for your AKS cluster, you must also [create](../aks/api-server-authorized-ip-ranges.md#create-an-aks-cluster-with-api-server-authorized-ip-ranges-enabled) or [update](../aks/api-server-authorized-ip-ranges.md#update-a-clusters-api-server-authorized-ip-ranges) your cluster to [allow additional ranges based on your region](https://github.com/Azure/dev-spaces/tree/master/public-ips).
95
95
@@ -266,6 +266,113 @@ For example, to stop and disable the *Windows BranchCache* service:
266
266
* Optionally, you can disable it by setting *Startup type* to *Disabled*.
267
267
* Click *OK*.
268
268
269
+
### Error "no AzureAssignedIdentity found for pod:azds/azds-webhook-deployment-\<id\> in assigned state"
270
+
271
+
When running a service with Azure Dev Spaces on an AKS cluster with a [managed identity](../aks/use-managed-identity.md) and [pod managed identities](../aks/developer-best-practices-pod-security.md#use-pod-managed-identities) installed, the process may hang after the *chart install* step. If you inspect the *azds-injector-webhook* in the *azds* name space, you may see this error.
272
+
273
+
The services Azure Dev Spaces runs on your cluster utilize the cluster's managed identity to talk to the Azure Dev Spaces backend services outside the cluster. When the pod managed identity is installed, networking rules are configured on your cluster's nodes to redirect all calls for managed identity credentials to a [Node Managed Identity (NMI) DaemonSet installed on the cluster](https://github.com/Azure/aad-pod-identity#node-managed-identity). This NMI DaemonSet identifies the calling pod and ensures that pod has been labeled appropriately to access the requested managed identity. Azure Dev Spaces can't detect if a cluster has pod managed identity installed and can't perform the necessary configuration to allow Azure Dev Spaces services to access the cluster's managed identity. Since the Azure Dev Spaces services haven't been configured to access the cluster's managed identity, the NMI DaemonSet will not allow them to obtain an AAD token for the managed identity and fail to communicate with Azure Dev Spaces backend services.
274
+
275
+
To fix this issue, apply an [AzurePodIdentityException](https://github.com/Azure/aad-pod-identity/blob/master/docs/readmes/README.app-exception.md) for the *azds-injector-webhook* and update pods instrumented by Azure Dev Spaces to access the managed identity.
276
+
277
+
Create a file named *webhookException.yaml* and copy the following YAML definition:
278
+
279
+
```yaml
280
+
apiVersion: "aadpodidentity.k8s.io/v1"
281
+
kind: AzurePodIdentityException
282
+
metadata:
283
+
name: azds-infrastructure-exception
284
+
namespace: azds
285
+
spec:
286
+
PodLabels:
287
+
azds.io/uses-cluster-identity: "true"
288
+
```
289
+
290
+
The above file creates a *AzurePodIdentityException* object for the *azds-injector-webhook*. To deploy this object, use `kubectl`:
291
+
292
+
```cmd
293
+
kubectl apply -f webhookException.yaml
294
+
```
295
+
296
+
To update pods instrumented by Azure Dev Spaces to access the managed identity, update the *namespace* in the below YAML definition and use `kubectl` to apply it for each dev space.
297
+
298
+
```yaml
299
+
apiVersion: "aadpodidentity.k8s.io/v1"
300
+
kind: AzurePodIdentityException
301
+
metadata:
302
+
name: azds-infrastructure-exception
303
+
namespace: myNamespace
304
+
spec:
305
+
PodLabels:
306
+
azds.io/instrumented: "true"
307
+
```
308
+
309
+
Alternatively, you can create *AzureIdentity* and *AzureIdentityBinding* objects and update the pod labels for workloads running in spaces instrumented by Azure Dev Spaces to access the managed identity created by the AKS cluster.
310
+
311
+
To list the details of the managed identity, run the following command for your AKS cluster:
312
+
313
+
```azurecli
314
+
az aks show -g <resourcegroup> -n <cluster> -o json --query "{clientId: identityProfile.kubeletidentity.clientId, resourceId: identityProfile.kubeletidentity.resourceId}"
315
+
```
316
+
317
+
The above command outputs the *clientId* and *resourceId* for the managed identity. For example:
To create an *AzureIdentity* object, create a file named *clusteridentity.yaml* and use the following YAML definition updated with the details of your managed identity from the previous command:
To create an *AzureIdentityBinding* object, create a file named *clusteridentitybinding.yaml* and use the following YAML definition:
340
+
341
+
```yaml
342
+
apiVersion: "aadpodidentity.k8s.io/v1"
343
+
kind: AzureIdentityBinding
344
+
metadata:
345
+
name: my-cluster-mi-binding
346
+
spec:
347
+
AzureIdentity: my-cluster-mi
348
+
Selector: my-label-value
349
+
```
350
+
351
+
To deploy the *AzureIdentity* and *AzureIdentityBinding* objects, use `kubectl`:
352
+
353
+
```cmd
354
+
kubectl apply -f clusteridentity.yaml
355
+
kubectl apply -f clusteridentitybinding.yaml
356
+
```
357
+
358
+
After you deploy the *AzureIdentity* and *AzureIdentityBinding* objects, any workload with the *aadpodidbinding: my-label-value* label can access the cluster's managed identity. Add this label and redeploy all workloads running in any dev space. For example:
359
+
360
+
```yaml
361
+
apiVersion: apps/v1
362
+
kind: Deployment
363
+
metadata:
364
+
name: sample
365
+
spec:
366
+
replicas: 1
367
+
template:
368
+
metadata:
369
+
labels:
370
+
app: sample
371
+
aadpodidbinding: my-label-value
372
+
spec:
373
+
[...]
374
+
```
375
+
269
376
## Common issues using Visual Studio and Visual Studio Code with Azure Dev Spaces
270
377
271
378
### Error "Required tools and configurations are missing"
0 commit comments