github.com/argoproj/argo-cd@v1.8.7/docs/operator-manual/troubleshooting.md (about)

     1  # Troubleshooting Tools
     2  
     3  The document describes how to use `argocd-tool` binary 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-util` binary to
    10  make sure that settings are valid and Argo CD is working as expected. The `argocd-util` binary is available in `argocd`
    11  image and might be used using docker. Example:
    12  
    13  ```bash
    14  docker run --rm -it -w /src -v $(pwd):/src argoproj/argocd:<version> \
    15    argocd-util settings validate --argocd-cm-path ./argocd-cm.yaml
    16  ```
    17  
    18  If you are using Linux you can extract `argocd-util` binary from docker image:
    19  
    20  ```bash
    21  docker run --rm -it -w /src -v $(pwd):/src argocd cp /usr/local/bin/argocd-util ./argocd-util
    22  ``` 
    23  
    24  The `argocd-util settings validate` command performs basic settings validation and print short summary
    25  of each settings group.
    26  
    27  **Diffing Customization**
    28  
    29  [Diffing customization](../user-guide/diffing.md) allows excluding some resource fields from diffing process.
    30  The diffing customizations are configured in `resource.customizations` field of `argocd-cm` ConfigMap.
    31  
    32  The following `argocd-util` command prints information about fields excluded from diffing in the specified ConfigMap.
    33  
    34  ```bash
    35  docker run --rm -it -w /src -v $(pwd):/src argoproj/argocd:<version> \
    36    argocd-util settings resource-overrides ignore-differences ./deploy.yaml --argocd-cm-path ./argocd-cm.yaml
    37  ```
    38  
    39  * Health Assessment
    40  
    41  [Health assessment](../user-guide/diffing.md) allows excluding some resource fields from diffing process.
    42  The diffing customizations are configured in `resource.customizations` field of `argocd-cm` ConfigMap. 
    43  
    44  The following `argocd-util` command assess resource health using Lua script configured in the specified ConfigMap.
    45  
    46  ```bash
    47  docker run --rm -it -w /src -v $(pwd):/src argoproj/argocd:<version> \
    48    argocd-util settings resource-overrides health ./deploy.yaml --argocd-cm-path ./argocd-cm.yaml
    49  ```
    50  
    51  * Resource Actions
    52  
    53  Resource actions allows configuring named Lua script which performs resource modification.
    54  
    55  The following `argocd-util` command executes action using Lua script configured in the specified ConfigMap and prints
    56  applied modifications.
    57  
    58  ```bash
    59  docker run --rm -it -w /src -v $(pwd):/src argoproj/argocd:<version> \
    60    argocd-util settings resource-overrides run-action /tmp/deploy.yaml restart --argocd-cm-path /private/tmp/argocd-cm.yaml 
    61  ```
    62  
    63  The following `argocd-util` command lists actions available for a given resource using Lua script configured in the specified ConfigMap.
    64  
    65  ```bash
    66  docker run --rm -it -w /src -v $(pwd):/src argoproj/argocd:<version> \
    67    argocd-util settings resource-overrides list-actions /tmp/deploy.yaml --argocd-cm-path /private/tmp/argocd-cm.yaml 
    68  ```
    69  
    70  ## Cluster credentials
    71  
    72  The `argocd-util kubeconfig` is useful if you manually created Secret with cluster credentials and trying need to
    73  troubleshoot connectivity issues. In this case, it is suggested to use the following steps:
    74  
    75  1 SSH into [argocd-application-controller] pod.
    76  
    77  ```
    78  kubectl exec -n argocd -it \
    79    $(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-application-controller -o jsonpath='{.items[0].metadata.name}') bash
    80  ```
    81  
    82  2 Use `argocd-util kubeconfig` command to export kubeconfig file from the configured Secret: 
    83  
    84  ```
    85  argocd-util kubeconfig https://<api-server-url> /tmp/kubeconfig --namespace argocd
    86  ```
    87  
    88  3 Use `kubectl` to get more details about connection issues, fix them and apply changes back to secret:
    89  
    90  ```
    91  export KUBECONFIG=/tmp/kubeconfig
    92  kubectl get pods -v 9
    93  ```