github.com/argoproj/argo-cd@v1.8.7/docs/user-guide/commands/argocd_app_sync.md (about) 1 ## argocd app sync 2 3 Sync an application to its target state 4 5 ### Synopsis 6 7 Sync an application to its target state 8 9 ``` 10 argocd app sync [APPNAME... | -l selector] [flags] 11 ``` 12 13 ### Examples 14 15 ``` 16 # Sync an app 17 argocd app sync my-app 18 19 # Sync multiples apps 20 argocd app sync my-app other-app 21 22 # Sync apps by label, in this example we sync apps that are children of another app (aka app-of-apps) 23 argocd app sync -l app.kubernetes.io/instance=my-app 24 25 # Sync a specific resource 26 # Resource should be formatted as GROUP:KIND:NAME. If no GROUP is specified then :KIND:NAME 27 argocd app sync my-app --resource :Service:my-service 28 argocd app sync my-app --resource argoproj.io:Rollout:my-rollout 29 # Specify namespace if the application has resources with the same name in different namespaces 30 argocd app sync my-app --resource argoproj.io:Rollout:my-namespace/my-rollout 31 ``` 32 33 ### Options 34 35 ``` 36 --async Do not wait for application to sync before continuing 37 --dry-run Preview apply without affecting cluster 38 --force Use a force apply 39 -h, --help help for sync 40 --info stringArray A list of key-value pairs during sync process. These infos will be persisted in app. 41 --label stringArray Sync only specific resources with a label. This option may be specified repeatedly. 42 --local string Path to a local directory. When this flag is present no git queries will be made 43 --local-repo-root string Path to the repository root. Used together with --local allows setting the repository root (default "/") 44 --prune Allow deleting unexpected resources 45 --resource stringArray Sync only specific resources as GROUP:KIND:NAME. Fields may be blank. This option may be specified repeatedly 46 --retry-backoff-duration string Retry backoff base duration. Default unit is seconds, but could also be a duration (e.g. 2m, 1h) (default "5s") 47 --retry-backoff-factor int Factor multiplies the base duration after each failed retry (default 2) 48 --retry-backoff-max-duration string Max retry backoff duration. Default unit is seconds, but could also be a duration (e.g. 2m, 1h) (default "180s") 49 --retry-limit int Max number of allowed sync retries 50 --revision string Sync to a specific revision. Preserves parameter overrides 51 -l, --selector string Sync apps that match this label 52 --strategy string Sync strategy (one of: apply|hook) 53 --timeout uint Time out after this many seconds 54 ``` 55 56 ### Options inherited from parent commands 57 58 ``` 59 --auth-token string Authentication token 60 --client-crt string Client certificate file 61 --client-crt-key string Client certificate key file 62 --config string Path to Argo CD config (default "/home/user/.argocd/config") 63 --grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. 64 --grpc-web-root-path string Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root. 65 -H, --header strings Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers) 66 --insecure Skip server certificate and domain verification 67 --logformat string Set the logging format. One of: text|json (default "text") 68 --loglevel string Set the logging level. One of: debug|info|warn|error (default "info") 69 --plaintext Disable TLS 70 --port-forward Connect to a random argocd-server port using port forwarding 71 --port-forward-namespace string Namespace name which should be used for port forwarding 72 --server string Argo CD server address 73 --server-crt string Server certificate file 74 ``` 75 76 ### SEE ALSO 77 78 * [argocd app](argocd_app.md) - Manage applications 79