tanzu package

CLI plugin: package | Primarily used for: Tanzu Kubernetes Grid, Tanzu Kubernetes Grid 2 with Supervisor, Tanzu Application Platform

The tanzu package command group manages Tanzu packages. This command group includes the following commands:

Usage

tanzu package [COMMAND]

You can run the above tanzu package commands in either of the following modes:

Global Flags (Default)

-h, --help

Help text.

-v, --verbose

Log verbosity, from 0 to 9.

Global Flags (kctrl enabled)

--column

Filter to show only given columns.

--debug

Include debug output.

--h, --help

Help text.

--kube-api-burst

Set Kubernetes API client burst limit. Default value is 1000.

--kube-api-qps

Set Kubernetes API client QPS limit. Default value is 1000.

--kubeconfig

Path to the kubeconfig file.

--kubeconfig-context

Overide the existing context set in kubeconfig.

--kubeconfig-yaml

Pass contents of kubeconfig file to as YAML.

--ytt

Force TTY-like output. Enabled by default.

--yes

Assumes yes for any prompt.

tanzu package (default)

The sections below apply to the default mode of tanzu package. To see CLI reference for tanzu package in kctrl mode, skip to tanzu package with kctrl section.

tanzu package available

Manages available packages. For more information, see Packages.

Commands:

Flags

-h, --help

Help text.

--generate-default-values-file

Creates a configuration file with default values for the specified packaged.

--kubeconfig

The path to the kubeconfig file of the target cluster. You can use this flag to point the Tanzu CLI to a cluster other than the current default, without changing the current context of kubectl. For example, if the context of your kubectl is set to a management cluster and you do not want to change it, you can use --kubeconfig flag to run the above commands against a workload cluster.

-n, --namespace

The target namespace. If this flag is not specified, the Tanzu CLI targets the default namespace.

-o, --output

Output format. Supported values are yaml, json, and table.

tanzu package available get

Shows the details of an available package.

Usage

tanzu package available get AVAILABLE-PACKAGE-NAME [FLAGS]

And:

tanzu package available get AVAILABLE-PACKAGE-NAME/AVAILABLE-PACKAGE-VERSION [FLAGS]

Examples

To get the details of the contour.tanzu.vmware.com package in the example-namespace:

tanzu package available get contour.tanzu.vmware.com --namespace example-namespace

To get the details of v1.17.1+vmware.1-tkg.1 of the contour.tanzu.vmware.com package in the example-namespace:

tanzu package available get contour.tanzu.vmware.com/1.17.1+vmware.1-tkg.1 --namespace example-namespace

To get the OpenAPI schema of v1.17.1+vmware.1-tkg.1 of the contour.tanzu.vmware.com package in the example-namespace:

tanzu package available get contour.tanzu.vmware.com/1.17.1+vmware.1-tkg.1 --namespace example-namespace --values-schema

Flags

-h, --help

Help text.

--values-schema

The OpenAPI schema of the package.

tanzu package available list

Lists all available packages and package versions.

Usage

tanzu package available list [FLAGS]

And:

tanzu package list AVAILABLE-PACKAGE-NAME [FLAGS]

Examples

To list available packages across all namespaces:

tanzu package available list --all-namespaces

To list available packages only in the default namespace:

tanzu package available list

To list all versions of the contour.tanzu.vmware.com package in the example-namespace:

tanzu package available list contour.tanzu.vmware.com --namespace example-namespace

Flags

-A, --all-namespaces

When --all-namespaces is specified, the command lists available packages from all namespaces.

-h, --help

Help text.

tanzu package completion

Ignore this command. To enable command completion for Tanzu CLI commands, use tanzu completion.

tanzu package install

Installs the specified package. For more information, see Packages.

Usage

tanzu package install INSTALLED-PACKAGE-NAME --package-name AVAILABLE-PACKAGE-NAME --version AVAILABLE-PACKAGE-VERSION [FLAGS]

Examples

To install v1.17.1+vmware.1-tkg.1 of the contour.tanzu.vmware.com package into example-namespace, without waiting for package reconciliation to complete:

tanzu package install my-contour --package-name contour.tanzu.vmware.com --namespace example-namespace --version 1.17.1+vmware.1-tkg.1 --wait=false

To install v1.17.1+vmware.1-tkg.1 of the contour.tanzu.vmware.com package into example-namespace with the kubeconfig option:

tanzu package install my-contour --package-name contour.tanzu.vmware.com --namespace example-namespace --version 1.17.1+vmware.1-tkg.1 --kubeconfig /tmp/my-cluster-kubeconfig

Flags

--create-namespace

Creates the target namespace if it does not exist.

-h, --help

Help text.

--kubeconfig

The path to the kubeconfig file.

-n, --namespace

The namespace in which to install the package. If --namespace is not specified, the command targets the default namespace.

-p, --package-name

The name of the package that you are installing.

--poll-interval

The time interval between two package reconciliation status polls. The default setting is 1s.

--poll-timeout

The timeout value for package reconciliation status polls. The default setting is 15m0s.

--service-account-name

The name of the service account that is used to install the contents of the package.

-f, --values-file

The path to the package configuration file.

-v, --version

The version of the package that you are installing.

--wait

Waits for package reconciliation to complete. The default setting is true. To disable the default setting, specify --wait=false.

tanzu package installed

Manages installed packages. For more information, see Packages.

Additionally, with the integration kctrl with Tanzu CLI, new commands are tanzu package installed commands can be used that manage your package installation. For more information, see kctrl Integration to learn more.

Flags

-h, --help

Help text.

--kubeconfig

The path to the kubeconfig file of the target cluster. You can use this flag to point the Tanzu CLI to a cluster other than the current default, without changing the current context of kubectl. For example, if the context of your kubectl is set to a management cluster and you do not want to change it, you can use --kubeconfig flag to run the above commands against a workload cluster.

tanzu package installed create

Same as tanzu package install.

tanzu package installed delete

Deletes the specified package.

Usage

tanzu package installed delete INSTALLED-PACKAGE-NAME [FLAGS]

Example

To delete the my-contour package from my-package-namespace:

tanzu package installed delete my-contour -n my-package-namespace

Flags

-h, --help

Help text.

-n, --namespace

The namespace of the package that you are deleting. If --namespace is not specified, the command targets the default namespace.

--poll-interval

The time interval between two package deletion status polls. The default setting is 1s.

--poll-timeout

The timeout value for package reconciliation status polls. The default setting is 15m0s.

-y, --yes

When --yes is specified, the command skips the confirmation step.

tanzu package installed get

Shows the details of the specified package.

Usage

tanzu package installed get INSTALLED-PACKAGE-NAME [FLAGS]

Example

To get the details of the my-contour package installed in my-package-namespace:

tanzu package installed get my-contour --namespace my-package-namespace

Flags

-h, --help

Help text.

-n, --namespace

The namespace of the installed package. If --namespace is not specified, the command targets the default namespace.

-o, --output

Output format. Supported values are yaml, json, and table.

-f, --values-file

The path to the package configuration file.

tanzu package installed list

Lists all installed packages.

Usage

tanzu package installed list [FLAGS]

Examples

To list installed packages across all namespaces:

tanzu package installed list --all-namespaces

To list installed packages only in the default namespace:

tanzu package installed list

To list installed packages in my-package-namespace:

tanzu package installed list --namespace my-package-namespace

Flags

-A, --all-namespaces

When --all-namespaces is specified, the command lists installed packages from all namespaces.

-h, --help

Help text.

-n, --namespace

The namespace of the installed package. If not specified, tanzu package installed list targets the default namespace.

-o, --output

Output format. Supported values are yaml, json, and table.

tanzu package installed update

Updates the current version or configuration of the specified package.

Usage

tanzu package installed update INSTALLED-PACKAGE-NAME [FLAGS]

Examples

To update the my-contour package installed in my-package-namespace to v1.17.1+vmware.1-tkg.1:

tanzu package installed update my-contour --version 1.17.1+vmware.1-tkg.1 --namespace my-package-namespace

To update both the my-contour package version and configuration:

tanzu package installed update my-contour -v 1.17.1+vmware.1-tkg.1 --values-file contour-default-values.yaml --namespace my-package-namespace

Flags

-h, --help

Help text.

--install

Installs the package if it is not installed.

-n, --namespace

The namespace of the installed package. If --namespace is not specified, the command targets the default namespace.

-p, --package-name

The public name for the package.

--poll-interval

The time interval between two package reconciliation status polls. The default setting is 1s.

--poll-timeout

The timeout value for package reconciliation status polls. The default setting is 15m0s.

-f, --values-file

The path to the package configuration file.

-v, --version

The version that you are updating the package to.

--wait

Waits for package reconciliation to complete. The default setting is true. To disable the default setting, specify --wait=false.

tanzu package repository

Manages package repositories. For more information, see Package Repositories.

Commands:

Flags

-h, --help

Help text.

--kubeconfig

The path to the kubeconfig file of the target cluster. You can use this flag to point the Tanzu CLI to a cluster other than the current default, without changing the current context of kubectl. For example, if the context of your kubectl is set to a management cluster and you do not want to change it, you can use --kubeconfig flag to run the above commands against a workload cluster.

-n, --namespace

The target namespace. If this flag is not specified, the Tanzu CLI targets the default namespace.

tanzu package repository add

Adds a package repository.

NOTE: You cannot add a Tanzu Community Edition (TCE) package repository to a cluster created by Tanzu Kubernetes Grid. TCE packages are incompatible with Tanzu Kubernetes Grid.

Usage

tanzu package repository add REPOSITORY-NAME --url REPOSITORY-URL [FLAGS]

Example

To create my-repository-namespace and add the repository named my-repository to the newly created namespace:

tanzu package repository add my-repository --url projects.registry.vmware.com/tkg/my-repo:v1.0.0 --namespace my-repository-namespace --create-namespace

The repository URL used above is an example.

Flags

--create-namespace

Creates the target namespace if it does not exist.

-h, --help

Help text.

--poll-interval

The time interval between two polls of the package repository reconciliation status. The default setting is 1s.

--poll-timeout

The timeout value for polls of the package repository reconciliation status. The default setting is 15m0s.

--url

The OCI registry URL of the package repository bundle.

--wait

Waits for package repository reconciliation to complete. The default setting is true. To disable the default setting, specify --wait=false.

tanzu package repository delete

Deletes the specified package repository.

Usage

tanzu package repository delete REPOSITORY-NAME [FLAGS]

Example

To delete my-repository from my-repository-namespace:

tanzu package repository delete my-repository --namespace my-repository-namespace

Flags

-f, --force

Forces the deletion of the package repository.

-h, --help

Help text.

--poll-interval

The time interval between two polls of the package repository reconciliation status. The default setting is 1s.

--poll-timeout

The timeout value for polls of the package repository reconciliation status. The default setting is 15m0s.

--wait

Waits for package repository reconciliation to complete. Defaults to true. To disable the default setting, specify --wait=false.

-y, --yes

When --yes is specified, the command skips the confirmation step.

tanzu package repository get

Shows the details of a package repository.

Usage

tanzu package repository get REPOSITORY-NAME [FLAGS]

Example

To get the details of my-repository from my-repository-namespace:

tanzu package repository get my-repository --namespace my-repository-namespace

Flags

-h, --help

Help text.

-o, --output

Output format. Supported values are yaml, json, and table.

tanzu package repository list

Lists all package repositories.

Usage

tanzu package repository list [FLAGS]

Examples

To list package repositories across all namespaces:

tanzu package repository list --all-namespaces

To list package repositories only in the default namespace:

tanzu package repository list

Flags

-A, --all-namespaces

When --all-namespaces is not specified, the command lists package repositories from all namespaces.

-h, --help

Help text.

-o, --output

Output format. Supported values are yaml, json, and table.

tanzu package repository update

Updates the URL of a package repository.

NOTE: Do not update the URL of the tanzu-standard package repository if the target cluster is connected to VMware Tanzu Mission Control.

Usage

tanzu package repository update REPOSITORY-NAME --url REPOSITORY-URL [FLAGS]

Example

To update the URL of my-repository in the default namespace:

tanzu package repository update my-repository --url projects.registry.vmware.com/tkg/my-repo:v1.0.1

The repository URL used above is an example.

Flags

--create

Creates the package repository if it does not exist.

--create-namespace

Creates the namespace if it does not exist.

-h, --help

Help text.

--poll-interval

The time interval between two polls of the package repository reconciliation status. The default setting is 1s.

--poll-timeout

The timeout value for polls of the package repository reconciliation status. The default setting is 15m0s.

--url

The OCI registry URL of the package repository bundle.

--wait

Waits for package repository reconciliation to complete. The default setting is true. To disable the default setting, specify --wait=false.

tanzu package with kctrl

kctrl is kapp-controller’s native CLI which helps users interact with and observe custom resources exposed by kapp-controller. With the kctrl mode enabled, tanzu package commands work identically to kctrl package commands. kctrl mode is disabled by default. See the features section in Tanzu CLI Architecture and Configuration to learn how to enable it.

The following additional commands are available when kctrl mode is activated, along with all the default tanzu package commands.

Commands:

tanzu package installed status

View status of the application created by package install.

Usage

tanzu package installed status INSTALLED_PACKAGE_NAME [flags]

Example

tanzu package installed status my-contour

Flags

h, help

Help text.

-n, --namespace

The namespace of the installed package. If --namespace is not specified, the command targets the default namespace.

tanzu package installed pause

Pause reconciliation of package install.

Usage

tanzu package installed pause INSTALLED_PACKAGE_NAME [flags]

Example

tanzu package installed pause my-contour

Flags

h, help

Help text.

-n, --namespace

The namespace of the installed package. If --namespace is not specified, the command targets the default namespace.

tanzu package installed kick

Triggers reconciliation of package install.

Usage

tanzu package installed kick INSTALLED_PACKAGE_NAME [flags]

Example

tanzu package installed kick my-contour

Flags

h, help

Help text.

-n, --namespace

The namespace of the installed package. If --namespace is not specified, the command targets the default namespace.

--wait

Wait for reconciliation to complete. It is enabled by default.

--wait-check-interval

The wait time between checks during package reconciliation. The default setting is 1s.

--wait-timeout

The maximum time to wait during the wait phase while reconciliation is in progress. The default setting is 15m0s

Changes in tanzu cli with kctrl enabled

When kctrl mode is enabled, addtional changes are applied to the tanzu package command group. The details of the changes are discussed in the table below.

Flags kctrl disabled kctrl enabled
–v, –verbose Global flag to log verbosity, from 0 to 9. Removed
–create-namespace Flag to create a target namespace if it does not exist. Removed. Impacts the following commands:
  • package repository add
  • package repository update
  • package installed create
–poll-interval tanzu install flag to set time interval between two reconciliation status polls. Changed to –wait-interval. Impacts the following commands:
  • package repository add
  • package repository update
  • package repository delete
  • package install
  • package installed create
  • package installed update
–poll-timeout tanzu install flag to set timeout value for package reconciliation status polls. changed to –wait-timeout. Impacts the following commands:
  • package repository add
  • package repository update
  • package repository delete
  • package install
  • package installed create
  • package installed update
–create When used with package repository update command, it creates the package repository if it does not exist. Removed. Impacts package repository update command.
–generate-default-values-file Creates a configuration file with default values for the specified packaged. Renamed to –default-values-file-output.
–package-name Name of the package you are installing. Renamed to –package. Impacts the following commands:
  • package installed create
  • package install
–install Installs the package if it is not installed. Removed. Impacts the following commands:
  • package install create
  • package installed create

check-circle-line exclamation-circle-line close-line
Scroll to top icon