Skip to content

Commit 4b3656c

Browse files
Merge pull request #232431 from JnHs/jh-arck8-tsfv1
add link to flux v1 retirement; move v2 higher
2 parents c4d4369 + 82f55a9 commit 4b3656c

File tree

1 file changed

+88
-88
lines changed

1 file changed

+88
-88
lines changed

articles/azure-arc/kubernetes/troubleshooting.md

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Troubleshoot common Azure Arc-enabled Kubernetes issues"
3-
ms.date: 03/13/2023
3+
ms.date: 03/28/2023
44
ms.topic: how-to
55
ms.custom: devx-track-azurecli
66
description: "Learn how to resolve common issues with Azure Arc-enabled Kubernetes clusters and GitOps."
@@ -81,15 +81,15 @@ For more information, see [Debugging DNS Resolution](https://kubernetes.io/docs/
8181

8282
Issues with outbound network connectivity from the cluster may arise for different reasons. First make sure all of the [network requirements](network-requirements.md) have been met.
8383

84-
If you encounter this issue, and your cluster is behind an outbound proxy server, make sure you have passed proxy parameters during the onboarding of your cluster and that the proxy is configured correctly. For more information, see [Connect using an outbound proxy server](quickstart-connect-cluster.md#connect-using-an-outbound-proxy-server).
84+
If you encounter this issue, and your cluster is behind an outbound proxy server, make sure you've passed proxy parameters during the onboarding of your cluster and that the proxy is configured correctly. For more information, see [Connect using an outbound proxy server](quickstart-connect-cluster.md#connect-using-an-outbound-proxy-server).
8585

8686
### Unable to retrieve MSI certificate
8787

8888
Problems retrieving the MSI certificate are usually due to network issues. Check to make sure all of the [network requirements](network-requirements.md) have been met, then try again.
8989

9090
### Insufficient cluster permissions
9191

92-
If the provided kubeconfig file doesn't have sufficient permissions to install the Azure Arc agents, the Azure CLI command will return an error.
92+
If the provided kubeconfig file doesn't have sufficient permissions to install the Azure Arc agents, the Azure CLI command returns an error.
9393

9494
```azurecli
9595
az connectedk8s connect --resource-group AzureArc --name AzureArcCluster
@@ -159,7 +159,7 @@ To resolve this issue, try the following steps.
159159
config-agent-65d5df564f-lffqm 1/2 CrashLoopBackOff 0 1m14s
160160
```
161161

162-
3. If the certificate below isn't present, the system assigned managed identity hasn't been installed.
162+
3. If the `azure-identity-certificate` isn't present, the system assigned managed identity hasn't been installed.
163163

164164
```console
165165
kubectl get secret -n azure-arc -o yaml | grep name:
@@ -169,7 +169,7 @@ To resolve this issue, try the following steps.
169169
name: azure-identity-certificate
170170
```
171171

172-
To resolve this issue, try deleting the Arc deployment by running the `az connectedk8s delete` command and reinstalling it. If the issue continues to happen, it could be an issue with your proxy settings. In that case, [try connecting your cluster to Azure Arc via a proxy](./quickstart-connect-cluster.md#connect-using-an-outbound-proxy-server) to connect your cluster to Arc via a proxy. Please also verify if all the [network prerequisites](network-requirements.md) have been met.
172+
To resolve this issue, try deleting the Arc deployment by running the `az connectedk8s delete` command and reinstalling it. If the issue continues to happen, it could be an issue with your proxy settings. In that case, [try connecting your cluster to Azure Arc via a proxy](./quickstart-connect-cluster.md#connect-using-an-outbound-proxy-server) to connect your cluster to Arc via a proxy. Also verify that all of the [network prerequisites](network-requirements.md) have been met.
173173

174174
4. If the `clusterconnect-agent` and the `config-agent` pods are running, but the `kube-aad-proxy` pod is missing, check your pod security policies. This pod uses the `azure-arc-kube-aad-proxy-sa` service account, which doesn't have admin permissions but requires the permission to mount host path.
175175

@@ -183,7 +183,7 @@ To resolve this issue, try the following steps.
183183
name: kube-aad-proxy-certificate
184184
```
185185

186-
If the certificate is missing, [delete the deployment](quickstart-connect-cluster.md#clean-up-resources) and re-onboard with a different name for the cluster. If the problem continues, please contact support.
186+
If the certificate is missing, [delete the deployment](quickstart-connect-cluster.md#clean-up-resources) and re-onboard with a different name for the cluster. If the problem continues, contact support.
187187

188188
### Helm validation error
189189

@@ -197,7 +197,7 @@ az connectedk8s connect -n AzureArcTest -g AzureArcTest
197197
Ensure that you have the latest helm version installed before proceeding.
198198
This operation might take a while...
199199
200-
Please check if the azure-arc namespace was deployed and run 'kubectl get pods -n azure-arc' to check if all the pods are in running state. A possible cause for pods stuck in pending state could be insufficientresources on the Kubernetes cluster to onboard to arc.
200+
Check if the azure-arc namespace was deployed, and run 'kubectl get pods -n azure-arc' to check if all the pods are in running state. A possible cause for pods stuck in pending state could be insufficientresources on the Kubernetes cluster to onboard to Azure Arc.
201201
ValidationError: Unable to install helm release: Error: customresourcedefinitions.apiextensions.k8s.io "connectedclusters.arc.azure.com" not found
202202
```
203203

@@ -243,66 +243,6 @@ az extension add --name k8s-configuration
243243

244244
## GitOps management
245245

246-
### Flux v1 - General
247-
248-
> [!NOTE]
249-
> Eventually Azure will stop supporting GitOps with Flux v1, so begin using [Flux v2](./tutorial-use-gitops-flux2.md) as soon as possible.
250-
251-
To help troubleshoot issues with `sourceControlConfigurations` resource (Flux v1), run these Azure CLI commands with `--debug` parameter specified:
252-
253-
```azurecli
254-
az provider show -n Microsoft.KubernetesConfiguration --debug
255-
az k8s-configuration create <parameters> --debug
256-
```
257-
258-
### Flux v1 - Create configurations
259-
260-
Write permissions on the Azure Arc-enabled Kubernetes resource (`Microsoft.Kubernetes/connectedClusters/Write`) are necessary and sufficient for creating configurations on that cluster.
261-
262-
### `sourceControlConfigurations` remains `Pending` (Flux v1)
263-
264-
```console
265-
kubectl -n azure-arc logs -l app.kubernetes.io/component=config-agent -c config-agent
266-
$ k -n pending get gitconfigs.clusterconfig.azure.com -o yaml
267-
apiVersion: v1
268-
items:
269-
- apiVersion: clusterconfig.azure.com/v1beta1
270-
kind: GitConfig
271-
metadata:
272-
creationTimestamp: "2020-04-13T20:37:25Z"
273-
generation: 1
274-
name: pending
275-
namespace: pending
276-
resourceVersion: "10088301"
277-
selfLink: /apis/clusterconfig.azure.com/v1beta1/namespaces/pending/gitconfigs/pending
278-
uid: d9452407-ff53-4c02-9b5a-51d55e62f704
279-
spec:
280-
correlationId: ""
281-
deleteOperator: false
282-
enableHelmOperator: false
283-
giturl: [email protected]:slack/cluster-config.git
284-
helmOperatorProperties: null
285-
operatorClientLocation: azurearcfork8s.azurecr.io/arc-preview/fluxctl:0.1.3
286-
operatorInstanceName: pending
287-
operatorParams: '"--disable-registry-scanning"'
288-
operatorScope: cluster
289-
operatorType: flux
290-
status:
291-
configAppliedTime: "2020-04-13T20:38:43.081Z"
292-
isSyncedWithAzure: true
293-
lastPolledStatusTime: ""
294-
message: 'Error: {exit status 1} occurred while doing the operation : {Installing
295-
the operator} on the config'
296-
operatorPropertiesHashed: ""
297-
publicKey: ""
298-
retryCountPublicKey: 0
299-
status: Installing the operator
300-
kind: List
301-
metadata:
302-
resourceVersion: ""
303-
selfLink: ""
304-
```
305-
306246
### Flux v2 - General
307247

308248
To help troubleshoot issues with `fluxConfigurations` resource (Flux v2), run these Azure CLI commands with the `--debug` parameter specified:
@@ -322,7 +262,7 @@ For more information, see [How do I resolve `webhook does not support dry run` e
322262

323263
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 isn't already installed in a cluster and you create a GitOps configuration resource for that cluster, the extension will be installed automatically.
324264

325-
If you experience an error during installation, or if the extension is in a failed state, run a script to investigate. The cluster-type parameter can be set to `connectedClusters` for an Arc-enabled cluster or `managedClusters` for an AKS cluster. The name of the `microsoft.flux` extension will be "flux" if the extension was installed automatically during creation of a GitOps configuration. Look in the "statuses" object for information.
265+
If you experience an error during installation, or if the extension is in a failed state, run a script to investigate. The cluster-type parameter can be set to `connectedClusters` for an Arc-enabled cluster or `managedClusters` for an AKS cluster. The name of the `microsoft.flux` extension is "flux" if the extension was installed automatically during creation of a GitOps configuration. Look in the "statuses" object for information.
326266

327267
One example:
328268

@@ -384,15 +324,15 @@ kubectl delete namespaces flux-system
384324

385325
Some other aspects to consider:
386326

387-
* For an AKS cluster, assure that the subscription has the `Microsoft.ContainerService/AKS-ExtensionManager` feature flag enabled.
327+
* For an AKS cluster, ensure that the subscription has the `Microsoft.ContainerService/AKS-ExtensionManager` feature flag enabled.
388328

389329
```azurecli
390330
az feature register --namespace Microsoft.ContainerService --name AKS-ExtensionManager
391331
```
392332
393-
* Assure that the cluster doesn't have any policies that restrict creation of the `flux-system` namespace or resources in that namespace.
333+
* Ensure that the cluster doesn't have any policies that restrict creation of the `flux-system` namespace or resources in that namespace.
394334
395-
With these actions accomplished, you can either [recreate a flux configuration](./tutorial-use-gitops-flux2.md), which will install the flux extension automatically, or you can reinstall the flux extension manually.
335+
With these actions accomplished, you can either [recreate a flux configuration](./tutorial-use-gitops-flux2.md), which installs the flux extension automatically, or you can reinstall the flux extension manually.
396336
397337
### Flux v2 - Installing the `microsoft.flux` extension in a cluster with Azure AD Pod Identity enabled
398338
@@ -410,7 +350,7 @@ The extension status also returns as "Failed".
410350

411351
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, but the token request is intercepted by the [pod identity](../../aks/use-azure-ad-pod-identity.md)).
412352

413-
You can fix this issue by upgrading to the latest version of the `microsoft.flux` extension. For version 1.6.1 or earlier, the workaround is to create an `AzurePodIdentityException` that will tell Azure AD Pod Identity to ignore the token requests from flux-extension pods.
353+
You can fix this issue by upgrading to the latest version of the `microsoft.flux` extension. For version 1.6.1 or earlier, the workaround is to create an `AzurePodIdentityException` that tells Azure AD Pod Identity to ignore the token requests from flux-extension pods.
414354

415355
```console
416356
apiVersion: aadpodidentity.k8s.io/v1
@@ -439,17 +379,77 @@ The controllers installed in your Kubernetes cluster with the Microsoft Flux ext
439379

440380
| Container Name | CPU limit | Memory limit |
441381
| -------------- | ----------- | -------- |
442-
| fluxconfig-agent | 50m | 150Mi |
443-
| fluxconfig-controller | 100m | 150Mi |
444-
| fluent-bit | 20m | 150Mi |
445-
| helm-controller | 1000m | 1Gi |
446-
| source-controller | 1000m | 1Gi |
447-
| kustomize-controller | 1000m | 1Gi |
448-
| notification-controller | 1000m | 1Gi |
449-
| image-automation-controller | 1000m | 1Gi |
450-
| image-reflector-controller | 1000m | 1Gi |
451-
452-
If you have enabled a custom or built-in Azure Gatekeeper Policy, such as `Kubernetes cluster containers CPU and memory resource limits should not exceed the specified limits`, that limits the resources for containers on Kubernetes clusters, you will need to either ensure that the resource limits on the policy are greater than the limits shown above or the `flux-system` namespace is part of the `excludedNamespaces` parameter in the policy assignment.
382+
| fluxconfig-agent | 50 m | 150 Mi |
383+
| fluxconfig-controller | 100 m | 150 Mi |
384+
| fluent-bit | 20 m | 150 Mi |
385+
| helm-controller | 1000 m | 1 Gi |
386+
| source-controller | 1000 m | 1 Gi |
387+
| kustomize-controller | 1000 m | 1 i |
388+
| notification-controller | 1000 m | 1 Gi |
389+
| image-automation-controller | 1000 m | 1 Gi |
390+
| image-reflector-controller | 1000 m | 1 Gi |
391+
392+
If you've enabled a custom or built-in Azure Gatekeeper Policy that limits the resources for containers on Kubernetes clusters, such as `Kubernetes cluster containers CPU and memory resource limits should not exceed the specified limits`, ensure that either the resource limits on the policy are greater than the limits shown above or that the `flux-system` namespace is part of the `excludedNamespaces` parameter in the policy assignment.
393+
394+
### Flux v1
395+
396+
> [!NOTE]
397+
> We recommend [migrating to Flux v2](conceptual-gitops-flux2.md#migrate-from-flux-v1) as soon as possible. Support for Flux v1-based cluster configuration resources created prior to May 1, 2023 will end on [May 24, 2025](https://azure.microsoft.com/updates/migrate-your-gitops-configurations-from-flux-v1-to-flux-v2-by-24-may-2025/). Starting on May 1, 2023, you won't be able to create new Flux v1-based cluster configuration resources.
398+
399+
To help troubleshoot issues with `sourceControlConfigurations` resource (Flux v1), run these Azure CLI commands with `--debug` parameter specified:
400+
401+
```azurecli
402+
az provider show -n Microsoft.KubernetesConfiguration --debug
403+
az k8s-configuration create <parameters> --debug
404+
```
405+
406+
#### Flux v1 - Create configurations
407+
408+
Write permissions on the Azure Arc-enabled Kubernetes resource (`Microsoft.Kubernetes/connectedClusters/Write`) are necessary and sufficient for creating configurations on that cluster.
409+
410+
#### `sourceControlConfigurations` remains `Pending` (Flux v1)
411+
412+
```console
413+
kubectl -n azure-arc logs -l app.kubernetes.io/component=config-agent -c config-agent
414+
$ k -n pending get gitconfigs.clusterconfig.azure.com -o yaml
415+
apiVersion: v1
416+
items:
417+
- apiVersion: clusterconfig.azure.com/v1beta1
418+
kind: GitConfig
419+
metadata:
420+
creationTimestamp: "2020-04-13T20:37:25Z"
421+
generation: 1
422+
name: pending
423+
namespace: pending
424+
resourceVersion: "10088301"
425+
selfLink: /apis/clusterconfig.azure.com/v1beta1/namespaces/pending/gitconfigs/pending
426+
uid: d9452407-ff53-4c02-9b5a-51d55e62f704
427+
spec:
428+
correlationId: ""
429+
deleteOperator: false
430+
enableHelmOperator: false
431+
giturl: [email protected]:slack/cluster-config.git
432+
helmOperatorProperties: null
433+
operatorClientLocation: azurearcfork8s.azurecr.io/arc-preview/fluxctl:0.1.3
434+
operatorInstanceName: pending
435+
operatorParams: '"--disable-registry-scanning"'
436+
operatorScope: cluster
437+
operatorType: flux
438+
status:
439+
configAppliedTime: "2020-04-13T20:38:43.081Z"
440+
isSyncedWithAzure: true
441+
lastPolledStatusTime: ""
442+
message: 'Error: {exit status 1} occurred while doing the operation : {Installing
443+
the operator} on the config'
444+
operatorPropertiesHashed: ""
445+
publicKey: ""
446+
retryCountPublicKey: 0
447+
status: Installing the operator
448+
kind: List
449+
metadata:
450+
resourceVersion: ""
451+
selfLink: ""
452+
```
453453

454454
## Monitoring
455455

@@ -511,7 +511,7 @@ This warning occurs when you use a service principal to log into Azure. The serv
511511
az ad sp show --id bc313c14-388c-4e7d-a58e-70017303ee3b --query objectId -o tsv
512512
```
513513
514-
1. Sign in into Azure CLI using the service principal. Use the `<objectId>` value from above step to enable custom locations on the cluster:
514+
1. Sign in into Azure CLI using the service principal. Use the `<objectId>` value from the previous step to enable custom locations on the cluster:
515515
516516
* To enable custom locations when connecting the cluster to Arc, run the following command:
517517
@@ -527,7 +527,7 @@ This warning occurs when you use a service principal to log into Azure. The serv
527527
528528
## Azure Arc-enabled Open Service Mesh
529529
530-
The steps below provide guidance on validating the deployment of all the Open Service Mesh (OSM) extension components on your cluster.
530+
This section shows how to validate the deployment of all the Open Service Mesh (OSM) extension components on your cluster.
531531
532532
### Check OSM Controller **Deployment**
533533
@@ -727,7 +727,7 @@ Example output:
727727
1845
728728
```
729729

730-
The number in the output indicates the number of bytes, or the size of the CA Bundle. If this is empty, 0, or a number under 1000, the CA Bundle is not correctly provisioned. Without a correct CA Bundle, the `ValidatingWebhook` will throw an error.
730+
The number in the output indicates the number of bytes, or the size of the CA Bundle. If the output is empty, 0, or a number under 1000, the CA Bundle isn't correctly provisioned. Without a correct CA Bundle, the `ValidatingWebhook` will throw an error.
731731

732732
### Check the `osm-mesh-config` resource
733733

@@ -819,7 +819,7 @@ metadata:
819819
### Check namespaces
820820

821821
>[!Note]
822-
>The arc-osm-system namespace will never participate in a service mesh and will never be labeled or annotated with the key/values below.
822+
>The arc-osm-system namespace will never participate in a service mesh and will never be labeled or annotated with the key/values shown here.
823823

824824
We use the `osm namespace add` command to join namespaces to a given service mesh. When a Kubernetes namespace is part of the mesh, confirm the following:
825825

@@ -851,7 +851,7 @@ The following label must be present:
851851
}
852852
```
853853

854-
If you aren't using `osm` CLI, you could also manually add these annotations to your namespaces. If a namespace isn't annotated with `"openservicemesh.io/sidecar-injection": "enabled"`, or isn't labeled with `"openservicemesh.io/monitored-by": "osm"`, the OSM Injector will not add Envoy sidecars.
854+
If you aren't using `osm` CLI, you could also manually add these annotations to your namespaces. If a namespace isn't annotated with `"openservicemesh.io/sidecar-injection": "enabled"`, or isn't labeled with `"openservicemesh.io/monitored-by": "osm"`, the OSM Injector won't add Envoy sidecars.
855855

856856
>[!Note]
857857
>After `osm namespace add` is called, only **new** pods will be injected with an Envoy sidecar. Existing pods must be restarted with `kubectl rollout restart deployment` command.

0 commit comments

Comments
 (0)