github.com/argoproj/argo-cd/v2@v2.10.9/docs/operator-manual/troubleshooting.md (about) 1 # Troubleshooting Tools 2 3 The document describes how to use `argocd admin` subcommands to simplify Argo CD settings customizations and troubleshot 4 connectivity issues. 5 6 ## Settings 7 8 Argo CD provides multiple ways to customize system behavior and has a lot of settings. It might be dangerous to modify 9 settings on Argo CD used in production by multiple users. Before applying settings you can use `argocd admin` subcommands to 10 make sure that settings are valid and Argo CD is working as expected. 11 12 The `argocd admin settings validate` command performs basic settings validation and print short summary 13 of each settings group. 14 15 **Diffing Customization** 16 17 [Diffing customization](../user-guide/diffing.md) allows excluding some resource fields from diffing process. 18 The diffing customizations are configured in `resource.customizations` field of `argocd-cm` ConfigMap. 19 20 The following `argocd admin` command prints information about fields excluded from diffing in the specified ConfigMap. 21 22 ```bash 23 argocd admin settings resource-overrides ignore-differences ./deploy.yaml --argocd-cm-path ./argocd-cm.yaml 24 ``` 25 26 **Health Assessment** 27 28 Argo CD provides built-in [health assessment](./health.md) for several Kubernetes resources which can be further 29 customized by writing your own health checks in [Lua](https://www.lua.org/). 30 The health checks are configured in the `resource.customizations` field of `argocd-cm` ConfigMap. 31 32 The following `argocd admin` command assess resource health using Lua script configured in the specified ConfigMap. 33 34 ```bash 35 argocd admin settings resource-overrides health ./deploy.yaml --argocd-cm-path ./argocd-cm.yaml 36 ``` 37 38 **Resource Actions** 39 40 Resource actions allows configuring named Lua script which performs resource modification. 41 42 The following `argocd admin` command executes action using Lua script configured in the specified ConfigMap and prints 43 applied modifications. 44 45 ```bash 46 argocd admin settings resource-overrides run-action /tmp/deploy.yaml restart --argocd-cm-path /private/tmp/argocd-cm.yaml 47 ``` 48 49 The following `argocd admin` command lists actions available for a given resource using Lua script configured in the specified ConfigMap. 50 51 ```bash 52 argocd admin settings resource-overrides list-actions /tmp/deploy.yaml --argocd-cm-path /private/tmp/argocd-cm.yaml 53 ``` 54 55 ## Cluster credentials 56 57 The `argocd admin cluster kubeconfig` is useful if you manually created Secret with cluster credentials and trying need to 58 troubleshoot connectivity issues. In this case, it is suggested to use the following steps: 59 60 1 SSH into [argocd-application-controller] pod. 61 62 ``` 63 kubectl exec -n argocd -it \ 64 $(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-application-controller -o jsonpath='{.items[0].metadata.name}') bash 65 ``` 66 67 2 Use `argocd admin cluster kubeconfig` command to export kubeconfig file from the configured Secret: 68 69 ``` 70 argocd admin cluster kubeconfig https://<api-server-url> /tmp/kubeconfig --namespace argocd 71 ``` 72 73 3 Use `kubectl` to get more details about connection issues, fix them and apply changes back to secret: 74 75 ``` 76 export KUBECONFIG=/tmp/kubeconfig 77 kubectl get pods -v 9 78 ```