github.com/argoproj/argo-cd/v2@v2.10.5/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 gcr.io/heptio-images/ks-guestbook-demo:0.1
    28  
    29    # Create a app using a custom tool:
    30    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
    31  ```
    32  
    33  ### Options
    34  
    35  ```
    36        --allow-empty                                Set allow zero live resources when sync is automated
    37        --annotations stringArray                    Set metadata annotations (e.g. example=value)
    38    -N, --app-namespace string                       Namespace where the application will be created in
    39        --auto-prune                                 Set automatic pruning when sync is automated
    40        --config-management-plugin string            Config management plugin name
    41        --dest-name string                           K8s cluster Name (e.g. minikube)
    42        --dest-namespace string                      K8s target namespace
    43        --dest-server string                         K8s cluster URL (e.g. https://kubernetes.default.svc)
    44        --directory-exclude string                   Set glob expression used to exclude files from application source path
    45        --directory-include string                   Set glob expression used to include files from application source path
    46        --directory-recurse                          Recurse directory
    47        --env string                                 Application environment to monitor
    48    -f, --file string                                Filename or URL to Kubernetes manifests for the app
    49        --helm-chart string                          Helm Chart name
    50        --helm-pass-credentials                      Pass credentials to all domain
    51        --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)
    52        --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)
    53        --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)
    54        --helm-skip-crds                             Skip helm crd installation step
    55        --helm-version string                        Helm version
    56    -h, --help                                       help for create
    57        --ignore-missing-value-files                 Ignore locally missing valueFiles when setting helm template --values
    58        --jsonnet-ext-var-code stringArray           Jsonnet ext var
    59        --jsonnet-ext-var-str stringArray            Jsonnet string ext var
    60        --jsonnet-libs stringArray                   Additional jsonnet libs (prefixed by repoRoot)
    61        --jsonnet-tla-code stringArray               Jsonnet top level code arguments
    62        --jsonnet-tla-str stringArray                Jsonnet top level string arguments
    63        --kustomize-common-annotation stringArray    Set common labels in Kustomize
    64        --kustomize-common-label stringArray         Set common labels in Kustomize
    65        --kustomize-force-common-annotation          Force common annotations in Kustomize
    66        --kustomize-force-common-label               Force common labels in Kustomize
    67        --kustomize-image stringArray                Kustomize images (e.g. --kustomize-image node:8.15.0 --kustomize-image mysql=mariadb,alpine@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d)
    68        --kustomize-namespace string                 Kustomize namespace
    69        --kustomize-replica stringArray              Kustomize replicas (e.g. --kustomize-replica my-development=2 --kustomize-replica my-statefulset=4)
    70        --kustomize-version string                   Kustomize version
    71    -l, --label stringArray                          Labels to apply to the app
    72        --name string                                A name for the app, ignored if a file is set (DEPRECATED)
    73        --nameprefix string                          Kustomize nameprefix
    74        --namesuffix string                          Kustomize namesuffix
    75    -p, --parameter stringArray                      set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)
    76        --path string                                Path in repository to the app directory, ignored if a file is set
    77        --plugin-env stringArray                     Additional plugin envs
    78        --project string                             Application project name
    79        --release-name string                        Helm release-name
    80        --repo string                                Repository URL, ignored if a file is set
    81        --revision string                            The tracking source branch, tag, commit or Helm chart version the application will sync to
    82        --revision-history-limit int                 How many items to keep in revision history (default 10)
    83        --self-heal                                  Set self healing when sync is automated
    84        --set-finalizer                              Sets deletion finalizer on the application, application resources will be cascaded on deletion
    85        --sync-option Prune=false                    Add or remove a sync option, e.g add Prune=false. Remove using `!` prefix, e.g. `!Prune=false`
    86        --sync-policy string                         Set the sync policy (one of: none, automated (aliases of automated: auto, automatic))
    87        --sync-retry-backoff-duration duration       Sync retry backoff base duration. Input needs to be a duration (e.g. 2m, 1h) (default 5s)
    88        --sync-retry-backoff-factor int              Factor multiplies the base duration after each failed sync retry (default 2)
    89        --sync-retry-backoff-max-duration duration   Max sync retry backoff duration. Input needs to be a duration (e.g. 2m, 1h) (default 3m0s)
    90        --sync-retry-limit int                       Max number of allowed sync retries
    91        --upsert                                     Allows to override application with the same name even if supplied application spec is different from existing spec
    92        --validate                                   Validation of repo and cluster (default true)
    93        --values stringArray                         Helm values file(s) to use
    94        --values-literal-file string                 Filename or URL to import as a literal Helm values block
    95  ```
    96  
    97  ### Options inherited from parent commands
    98  
    99  ```
   100        --auth-token string               Authentication token
   101        --client-crt string               Client certificate file
   102        --client-crt-key string           Client certificate key file
   103        --config string                   Path to Argo CD config (default "/home/user/.config/argocd/config")
   104        --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")
   105        --core                            If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server
   106        --grpc-web                        Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2.
   107        --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.
   108    -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)
   109        --http-retry-max int              Maximum number of retries to establish http connection to Argo CD server
   110        --insecure                        Skip server certificate and domain verification
   111        --kube-context string             Directs the command to the given kube-context
   112        --logformat string                Set the logging format. One of: text|json (default "text")
   113        --loglevel string                 Set the logging level. One of: debug|info|warn|error (default "info")
   114        --plaintext                       Disable TLS
   115        --port-forward                    Connect to a random argocd-server port using port forwarding
   116        --port-forward-namespace string   Namespace name which should be used for port forwarding
   117        --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")
   118        --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")
   119        --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")
   120        --server string                   Argo CD server address
   121        --server-crt string               Server certificate file
   122        --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")
   123  ```
   124  
   125  ### SEE ALSO
   126  
   127  * [argocd app](argocd_app.md)	 - Manage applications
   128