github.com/argoproj/argo-cd/v3@v3.2.1/docs/user-guide/commands/argocd_app_create.md (about)

     1  # `argocd app create` Command Reference
     2  
     3  ## argocd app create
     4  
     5  Create an application
     6  
     7  ```
     8  argocd app create APPNAME [flags]
     9  ```
    10  
    11  ### Examples
    12  
    13  ```
    14    # Create a directory app
    15    argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --directory-recurse
    16  
    17    # Create a Jsonnet app
    18    argocd app create jsonnet-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path jsonnet-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --jsonnet-ext-str replicas=2
    19  
    20    # Create a Helm app
    21    argocd app create helm-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path helm-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --helm-set replicaCount=2
    22  
    23    # Create a Helm app from a Helm repo
    24    argocd app create nginx-ingress --repo https://charts.helm.sh/stable --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc
    25  
    26    # Create a Kustomize app
    27    argocd app create kustomize-guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path kustomize-guestbook --dest-namespace default --dest-server https://kubernetes.default.svc --kustomize-image quay.io/argoprojlabs/argocd-e2e-container:0.1
    28  
    29    # Create a MultiSource app while yaml file contains an application with multiple sources
    30    argocd app create guestbook --file <path-to-yaml-file>
    31  
    32    # Create a app using a custom tool:
    33    argocd app create kasane --repo https://github.com/argoproj/argocd-example-apps.git --path plugins/kasane --dest-namespace default --dest-server https://kubernetes.default.svc --config-management-plugin kasane
    34  ```
    35  
    36  ### Options
    37  
    38  ```
    39        --allow-empty                                Set allow zero live resources when sync is automated
    40        --annotations stringArray                    Set metadata annotations (e.g. example=value)
    41    -N, --app-namespace string                       Namespace where the application will be created in
    42        --auto-prune                                 Set automatic pruning when sync is automated
    43        --config-management-plugin string            Config management plugin name
    44        --dest-name string                           K8s cluster Name (e.g. minikube)
    45        --dest-namespace string                      K8s target namespace
    46        --dest-server string                         K8s cluster URL (e.g. https://kubernetes.default.svc)
    47        --directory-exclude string                   Set glob expression used to exclude files from application source path
    48        --directory-include string                   Set glob expression used to include files from application source path
    49        --directory-recurse                          Recurse directory
    50        --dry-source-path string                     Path in repository to the app directory for the dry source
    51        --dry-source-repo string                     Repository URL of the app dry source
    52        --dry-source-revision string                 Revision of the app dry source
    53        --env string                                 Application environment to monitor
    54    -f, --file string                                Filename or URL to Kubernetes manifests for the app
    55        --helm-api-versions stringArray              Helm api-versions (in format [group/]version/kind) to use when running helm template (Can be repeated to set several values: --helm-api-versions traefik.io/v1alpha1/TLSOption --helm-api-versions v1/Service). If not set, use the api-versions from the destination cluster
    56        --helm-chart string                          Helm Chart name
    57        --helm-kube-version string                   Helm kube-version to use when running helm template. If not set, use the kube version from the destination cluster
    58        --helm-namespace string                      Helm namespace to use when running helm template. If not set, use app.spec.destination.namespace
    59        --helm-pass-credentials                      Pass credentials to all domain
    60        --helm-set stringArray                       Helm set values on the command line (can be repeated to set several values: --helm-set key1=val1 --helm-set key2=val2)
    61        --helm-set-file stringArray                  Helm set values from respective files specified via the command line (can be repeated to set several values: --helm-set-file key1=path1 --helm-set-file key2=path2)
    62        --helm-set-string stringArray                Helm set STRING values on the command line (can be repeated to set several values: --helm-set-string key1=val1 --helm-set-string key2=val2)
    63        --helm-skip-crds                             Skip helm crd installation step
    64        --helm-skip-schema-validation                Skip helm schema validation step
    65        --helm-skip-tests                            Skip helm test manifests installation step
    66        --helm-version string                        Helm version
    67    -h, --help                                       help for create
    68        --hydrate-to-branch string                   The branch to hydrate the app to
    69        --ignore-missing-components                  Ignore locally missing component directories when setting Kustomize components
    70        --ignore-missing-value-files                 Ignore locally missing valueFiles when setting helm template --values
    71        --jsonnet-ext-var-code stringArray           Jsonnet ext var
    72        --jsonnet-ext-var-str stringArray            Jsonnet string ext var
    73        --jsonnet-libs stringArray                   Additional jsonnet libs (prefixed by repoRoot)
    74        --jsonnet-tla-code stringArray               Jsonnet top level code arguments
    75        --jsonnet-tla-str stringArray                Jsonnet top level string arguments
    76        --kustomize-api-versions stringArray         api-versions (in format [group/]version/kind) to use when running helm template (Can be repeated to set several values: --helm-api-versions traefik.io/v1alpha1/TLSOption --helm-api-versions v1/Service). If not set, use the api-versions from the destination cluster. Only applicable when Helm is enabled for Kustomize builds
    77        --kustomize-common-annotation stringArray    Set common labels in Kustomize
    78        --kustomize-common-label stringArray         Set common labels in Kustomize
    79        --kustomize-force-common-annotation          Force common annotations in Kustomize
    80        --kustomize-force-common-label               Force common labels in Kustomize
    81        --kustomize-image stringArray                Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d)
    82        --kustomize-kube-version string              kube-version to use when running helm template. If not set, use the kube version from the destination cluster. Only applicable when Helm is enabled for Kustomize builds
    83        --kustomize-label-include-templates          Apply common label to resource templates
    84        --kustomize-label-without-selector           Do not apply common label to selectors. Also do not apply label to templates unless --kustomize-label-include-templates is set
    85        --kustomize-namespace string                 Kustomize namespace
    86        --kustomize-replica stringArray              Kustomize replicas (e.g. --kustomize-replica my-development=2 --kustomize-replica my-statefulset=4)
    87        --kustomize-version string                   Kustomize version
    88    -l, --label stringArray                          Labels to apply to the app
    89        --name string                                A name for the app, ignored if a file is set (DEPRECATED)
    90        --nameprefix string                          Kustomize nameprefix
    91        --namesuffix string                          Kustomize namesuffix
    92    -p, --parameter stringArray                      set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)
    93        --path string                                Path in repository to the app directory, ignored if a file is set
    94        --plugin-env stringArray                     Additional plugin envs
    95        --project string                             Application project name
    96        --ref string                                 Ref is reference to another source within sources field
    97        --release-name string                        Helm release-name
    98        --repo string                                Repository URL, ignored if a file is set
    99        --revision string                            The tracking source branch, tag, commit or Helm chart version the application will sync to
   100        --revision-history-limit int                 How many items to keep in revision history (default 10)
   101        --self-heal                                  Set self healing when sync is automated
   102        --set-finalizer                              Sets deletion finalizer on the application, application resources will be cascaded on deletion
   103        --source-name string                         Name of the source from the list of sources of the app.
   104        --sync-option Prune=false                    Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false`
   105        --sync-policy string                         Set the sync policy (one of: manual (aliases of manual: none), automated (aliases of automated: auto, automatic))
   106        --sync-retry-backoff-duration duration       Sync retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s)
   107        --sync-retry-backoff-factor int              Factor multiplies the base duration after each failed sync retry (default 2)
   108        --sync-retry-backoff-max-duration duration   Max sync retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s)
   109        --sync-retry-limit int                       Max number of allowed sync retries
   110        --sync-retry-refresh                         Indicates if the latest revision should be used on retry instead of the initial one
   111        --sync-source-branch string                  The branch from which the app will sync
   112        --sync-source-path string                    The path in the repository from which the app will sync
   113        --upsert                                     Allows to override application with the same name even if supplied application spec is different from existing spec
   114        --validate                                   Validation of repo and cluster (default true)
   115        --values stringArray                         Helm values file(s) to use
   116        --values-literal-file string                 Filename or URL to import as a literal Helm values block
   117  ```
   118  
   119  ### Options inherited from parent commands
   120  
   121  ```
   122        --argocd-context string           The name of the Argo-CD server context to use
   123        --auth-token string               Authentication token; set this or the ARGOCD_AUTH_TOKEN environment variable
   124        --client-crt string               Client certificate file
   125        --client-crt-key string           Client certificate key file
   126        --config string                   Path to Argo CD config (default "/home/user/.config/argocd/config")
   127        --controller-name string          Name of the Argo CD Application controller; set this or the ARGOCD_APPLICATION_CONTROLLER_NAME environment variable when the controller's name label differs from the default, for example when installing via the Helm chart (default "argocd-application-controller")
   128        --core                            If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server
   129        --grpc-web                        Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2.
   130        --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.
   131    -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)
   132        --http-retry-max int              Maximum number of retries to establish http connection to Argo CD server
   133        --insecure                        Skip server certificate and domain verification
   134        --kube-context string             Directs the command to the given kube-context
   135        --logformat string                Set the logging format. One of: json|text (default "json")
   136        --loglevel string                 Set the logging level. One of: debug|info|warn|error (default "info")
   137        --plaintext                       Disable TLS
   138        --port-forward                    Connect to a random argocd-server port using port forwarding
   139        --port-forward-namespace string   Namespace name which should be used for port forwarding
   140        --prompts-enabled                 Force optional interactive prompts to be enabled or disabled, overriding local configuration. If not specified, the local configuration value will be used, which is false by default.
   141        --redis-compress string           Enable this if the application controller is configured with redis compression enabled. (possible values: gzip, none) (default "gzip")
   142        --redis-haproxy-name string       Name of the Redis HA Proxy; set this or the ARGOCD_REDIS_HAPROXY_NAME environment variable when the HA Proxy's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis-ha-haproxy")
   143        --redis-name string               Name of the Redis deployment; set this or the ARGOCD_REDIS_NAME environment variable when the Redis's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis")
   144        --repo-server-name string         Name of the Argo CD Repo server; set this or the ARGOCD_REPO_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-repo-server")
   145        --server string                   Argo CD server address
   146        --server-crt string               Server certificate file
   147        --server-name string              Name of the Argo CD API server; set this or the ARGOCD_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-server")
   148  ```
   149  
   150  ### SEE ALSO
   151  
   152  * [argocd app](argocd_app.md)	 - Manage applications
   153