Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI

This section covers the spec of every subcommand provided by the tazuna binary, one command per page.

The pages are designed to be read as a contract. For command choice and operational usage, see Guides; for what each command is solving in the first place, see Concepts.

Subcommand List

Global Flags

Persistent flags inherited by every subcommand.

FlagAliasTypeDefaultDescription
--file-path-fstringtazuna.yamlPath to tazuna.yaml.
--log-level-lstringinfoLog level. One of debug / info / warn / error.
--version---A flag set only on the root command. Prints version info and exits. Equivalent to tazuna version.

Common Behavior

kubeconfig

Subcommands that access the cluster load kubeconfig at startup and operate against the cluster pointed to by current-context. Tazuna does not provide its own KUBECONFIG environment variable or --kubeconfig equivalent flag; it follows the same resolution rules as kubectl.

Evaluating context_matches

When spec.context_matches is set in tazuna.yaml, the current-context name is matched against it immediately before touching the cluster.

  • Commands where evaluation runs: apply / destroy
  • Commands where evaluation does not run: build / check / state list / state diff / state sync / tags / version / secret-to-genesissecret

The evaluation mode follows spec.context_match_mode (or / and, default or). See tazuna.yaml schema - context_matches for details.

Validating tazuna.yaml

apply / build / destroy / check / tags all load and validate tazuna.yaml at the very start of execution. On validation failure, no cluster access happens. For the list of check items, see tazuna.yaml schema - Validation summary.

Exit Codes

Exit CodesMeaning
0Success
Non-zeroFailure. An error in the form error: ... is printed to stderr.

Non-zero exit can be treated as failure as-is by CI. There is currently no distinction in exit code per command.

Environment Variables

In addition to CLI flags, here is the list of environment variables Tazuna consults.

Environment VariablesValueAffected commandsEffect
TAZUNA_DESTROY_EXECUTABLEtruedestroyUnless this is set to true, destroy does not actually delete anything. Even if you say Yes at the prompt, nothing happens without this environment variable.
TAZUNA_STATE_SYNC_DELETEtruestate syncOnly when this is true, resources that remain in State but no longer exist in the cluster (removed) are deleted. The default is to skip deletion.
KUBECONFIGPathAll cluster-touching commandsFollows the same kubeconfig resolution rules as ordinary kubectl.