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
@@ -150,7 +150,7 @@ To recover from this issue, follow these steps:
150
150
151
151
## GitOps management
152
152
153
-
### General
153
+
### Flux v1 - General
154
154
155
155
To help troubleshoot issues with `sourceControlConfigurations` resource (Flux v1), run these az commands with `--debug` parameter specified:
156
156
@@ -166,7 +166,7 @@ az provider show -n Microsoft.KubernetesConfiguration --debug
166
166
az k8s-configuration flux create <parameters> --debug
167
167
```
168
168
169
-
### Create configurations
169
+
### Flux v1 - Create configurations
170
170
171
171
Write permissions on the Azure Arc-enabled Kubernetes resource (`Microsoft.Kubernetes/connectedClusters/Write`) are necessary and sufficient for creating configurations on that cluster.
172
172
@@ -214,7 +214,7 @@ metadata:
214
214
selfLink: ""
215
215
```
216
216
217
-
### Installing the `microsoft.flux` extension (Flux v2)
217
+
### Flux v2 - Error installing the `microsoft.flux` extension
218
218
219
219
The `microsoft.flux` extension installs the Flux controllers and Azure GitOps agents into your Azure Arc-enabled Kubernetes or Azure Kubernetes Service (AKS) clusters. If the extension is not already installed in a cluster and you create a GitOps configuration resource for that cluster, the extension will be installed automatically.
220
220
@@ -285,6 +285,35 @@ Some other aspects to consider:
285
285
286
286
With these actions accomplished you can either [re-create a flux configuration](./tutorial-use-gitops-flux2.md) which will install the flux extension automatically or you can re-install the flux extension manually.
287
287
288
+
### Flux v2 - Installing the `microsoft.flux` extension in a cluster with AAD Pod Identity enabled
289
+
290
+
If you attempt to install the Flux extension in a cluster that has AAD Pod Identity enabled, an error may occur in the extension-agent pod.
291
+
292
+
```console
293
+
{"Message":"2021/12/02 10:24:56 Error: in getting auth header : error {adal: Refresh request failed. Status Code = '404'. Response body: no azure identity found for request clientID <REDACTED>\n}","LogType":"ConfigAgentTrace","LogLevel":"Information","Environment":"prod","Role":"ClusterConfigAgent","Location":"westeurope","ArmId":"/subscriptions/<REDACTED>/resourceGroups/<REDACTED>/providers/Microsoft.Kubernetes/managedclusters/<REDACTED>","CorrelationId":"","AgentName":"FluxConfigAgent","AgentVersion":"0.4.2","AgentTimestamp":"2021/12/02 10:24:56"}
294
+
```
295
+
296
+
The extension status also returns as "Failed".
297
+
298
+
```console
299
+
"{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceOperationFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"ExtensionCreationFailed\",\"message\":\" error: Unable to get the status from the local CRD with the error : {Error : Retry for given duration didn't get any results with err {status not populated}}\"}]}}",
300
+
```
301
+
302
+
The issue is that the extension-agent pod is trying to get its token from IMDS on the cluster in order to talk to the extension service in Azure; however, this token request is being intercepted by pod identity ([details here](../../aks/use-azure-ad-pod-identity.md)).
303
+
304
+
The workaround is to create an `AzurePodIdentityException` that will tell AAD Pod Identity to ignore the token requests from flux-extension pods.
305
+
306
+
```console
307
+
apiVersion: aadpodidentity.k8s.io/v1
308
+
kind: AzurePodIdentityException
309
+
metadata:
310
+
name: flux-extension-exception
311
+
namespace: flux-system
312
+
spec:
313
+
podLabels:
314
+
app.kubernetes.io/name: flux-extension
315
+
```
316
+
288
317
## Monitoring
289
318
290
319
Azure Monitor for containers requires its DaemonSet to be run in privileged mode. To successfully set up a Canonical Charmed Kubernetes cluster for monitoring, run the following command:
0 commit comments