kubevela.github.io/docs/cli/vela_dry-run.md

2.6 KiB

title
vela dry-run

Dry Run an application, and output the K8s resources as result to stdout.

Synopsis

Dry-run application locally, render the Kubernetes resources as result to stdout. vela dry-run -d /definition/directory/or/file/ -f /path/to/app.yaml

You can also specify a remote url for app: vela dry-run -d /definition/directory/or/file/ -f https://remote-host/app.yaml

And more, you can specify policy and workflow with application file: vela dry-run -d /definition/directory/or/file/ -f /path/to/app.yaml -f /path/to/policy.yaml -f /path/to/workflow.yaml, OR vela dry-run -d /definition/directory/or/file/ -f /path/to/app.yaml,/path/to/policy.yaml,/path/to/workflow.yaml

Additionally, if the provided policy and workflow files are not referenced by application file, warning message will show up and those files will be ignored. You can use "merge" flag to make those standalone files effective: vela dry-run -d /definition/directory/or/file/ -f /path/to/app.yaml,/path/to/policy.yaml,/path/to/workflow.yaml --merge

Limitation: 1. Only support one object per file(yaml) for "-f" flag. More support will be added in the future improvement. 2. Dry Run with policy and workflow will only take override/topology policies and deploy workflow step into considerations. Other workflow step will be ignored.

vela dry-run

Examples


# dry-run application 
vela dry-run -f app.yaml

# dry-run application with policy and workflow
vela dry-run -f app.yaml -f policy.yaml -f workflow.yaml

Options

  -d, --definition string             specify a definition file or directory, it will only be used in dry-run rather than applied to K8s cluster
  -x, --definition-namespace string   Specify which namespace the definition locates. (default "vela-system")
  -e, --env string                    specify environment name for application
  -f, --file strings                  application related file names (default [app.yaml])
  -h, --help                          help for dry-run
      --merge                         Merge standalone files to produce dry-run results
  -n, --namespace string              specify the Kubernetes namespace to use
      --offline dry-run               Run dry-run in offline / local mode, all validation steps will be skipped

Options inherited from parent commands

  -V, --verbosity Level   number for the log level verbosity
  -y, --yes               Assume yes for all user prompts

SEE ALSO

Go Back to CLI Commands Homepage.

Auto generated by spf13/cobra script in KubeVela.