This topic provides information about Tanzu CLI architecture. It also explains how to update your Tanzu CLI configuration.
The Tanzu CLI uses a context-scoped, pluggable architecture that lets you connect to servers of multiple types and run the appropriate commands on each. For example, you can use the Tanzu CLI to connect to these Tanzu products:
tanzu apps
, tanzu accelerator
, and other commands described in Tanzu CLI Overview in the TAP documentation.Tanzu CLI commands are organized into command groups. To list available command groups, run tanzu
.
The list of available command groups differs based on what Tanzu CLI plugins are installed on your machine, and on what type of CLI context you are currently logged in to. Both of these depend on the Tanzu products that you are using.
For each plugin the Tanzu CLI defines a Target that associates the set of commands with the type of endpoint that the commands apply to, for example:
k8s
.tmc
.global
. These plugins are installed automatically with the Tanzu CLI.tanzu cluster
to fit the context.The tanzu plugin search
command lists plugin targets under a TARGET
column.
tanzu context
commands let you specify a default specific server context for each context type, switch contexts, and list the contexts for each context type using the --type
flag.
The core CLI has some command groups built in, and CLI plugins extend the CLI with additional command groups that are useful for particular products. Each plugin is an executable binary that packages a group of CLI commands.
Each product designates how its relevant plugins are installed, either standalone or context-scoped:
tanzu plugin install
command.
--group
option installs all of the standalone plugins needed for a specific product, and tanzu plugin group get
lists the plugins.tanzu context create
command, as appropriate for the product that creates or registers the context.A given product’s plugins might be installed all standalone, all context-scoped, or a mix.
This table summarizes how command groups come from the core CLI or plugins:
Source | Examples: tanzu... |
How Installed |
---|---|---|
Core | config , plugin , help |
Installed with the CLI |
Standalone plugins | apps , insight , and all other TAP plugins; management-cluster (TKG) |
Install with tanzu plugin install |
Context-scoped plugins | All TMC plugins; cluster , feature , and kubernetes-release (TKG) |
Installed automatically with tanzu context create |
For a list of Tanzu CLI plugins and commands that they provide, see Command Groups in Tanzu CLI Command Reference.
The Tanzu CLI configuration file, ~/.config/tanzu/config.yaml
, contains your Tanzu CLI configuration, including:
kubeconfig
locations for the servers that the CLI knows about, and which is the current oneYou can use the tanzu config set PATH VALUE
and tanzu config unset PATH
commands to customize your CLI configuration, as described in the table below. Running these commands updates the ~/.config/tanzu/config.yaml
file.
Path | Value | Description |
---|---|---|
env.VARIABLE |
Your variable value; for example, TANZU_CLI_CEIP_OPT_IN_PROMPT_ANSWER |
This path sets or unsets global environment variables for the Tanzu CLI. For example, tanzu config set env.TANZU_CLI_CEIP_OPT_IN_PROMPT_ANSWER Yes . Variables set by running tanzu config set persist until you unset them with tanzu config unset . For a list of variables that you can set, see Configuration File Variable Reference. |
features.global.FEATURE |
true or false |
This path activates or deactivates global features in your CLI configuration. Use only if you want to change or restore the defaults. For example, tanzu config set features.global.context-aware-cli-for-plugins true . |
features.PLUGIN.FEATURE |
true or false |
This path activates or deactivates plugin-specific features in your CLI configuration. Use only if you want to change or restore the defaults; some of these features are experimental and intended for evaluation and test purposes only. For example, running tanzu config set features.cluster.dual-stack-ipv4-primary true sets the dual-stack-ipv4-primary feature of the cluster CLI plugin to true . By default, only production-ready plugin features are set to true in the CLI. |
Deprecated: bomRepo , compatibilityFilePath , edition |
N/A | Retained for backward-compatibility with older versions of the Tanzu CLI that were bundled with TKG. Do not set. |
Name | Default | Description |
---|---|---|
Global features: | ||
tkr-version-v1alpha3-beta |
false |
Sets the API version for the kubernetes-release plugin to v1alpha3 . Do not set; reserved for future use. |
management-cluster plugin features: |
||
aws-instance-types-exclude-arm |
true |
Excludes ARM-based instance types from the list of available instance types in the Tanzu Kubernetes Grid installer interface when deploying a management cluster to AWS. This feature is set by Tanzu Kubernetes Grid; do not set manually. |
dual-stack-ipv4-primary |
false |
(Technical Preview, vSphere only) Allows you to deploy dual-stack clusters, with IPv4 as the primary protocol. This feature is in development. |
dual-stack-ipv6-primary |
false |
(Technical Preview, vSphere only) Allows you to deploy dual-stack clusters, with IPv6 as the primary protocol. This feature is in development. |
export-from-confirm |
true |
Activates the Export Configuration button in the Tanzu Kubernetes Grid installer interface. |
import |
false |
Allows you to import the cluster configuration file into the Tanzu Kubernetes Grid installer interface. This feature is not available in Tanzu Kubernetes Grid v1.6+. |
standalone-cluster-mode |
false |
Allows you to deploy standalone clusters in Tanzu Community Edition. This feature is not available in Tanzu Kubernetes Grid. |
cluster plugin features: |
||
allow-legacy-cluster |
false |
Allows you to create plan-based clusters (legacy). By default, the Tanzu CLI creates class-based clusters. |
auto-apply-generated-clusterclass-based-configuration |
false |
Auto-applies the class-based cluster configuration generated by the Tanzu CLI when you pass a legacy cluster configuration file to tanzu cluster create . When set to false , tanzu cluster create saves the configuration to a file without creating the cluster. |
dual-stack-ipv4-primary |
false |
(Technical Preview, vSphere only) See management-cluster plugin features, above. |
dual-stack-ipv6-primary |
false |
(Technical Preview, vSphere only) See management-cluster plugin features, above. |
network-separation-beta |
Experimental. Do not enable. Reserved for future use. | |
package plugin features: |
||
kctrl-command-tree |
true |
Activates or deactivates kctrl mode for tanzu package commands. This mode provides extended functionality for observability and debugging. For more information, see tanzu package with kctrl. |
To activate a CLI feature:
To activate a global feature, run:
tanzu config set features.global.FEATURE true
Where FEATURE
is the name of the feature that you want to activate.
To activate a plugin feature, run:
tanzu config set features.PLUGIN.FEATURE true
Where:
PLUGIN
is the name of the CLI plugin. For example, cluster
or management-cluster
.FEATURE
is the name of the feature that you want to activate.To deactivate a CLI feature:
To deactivate a global feature, run:
tanzu config set features.global.FEATURE false
Where FEATURE
is the name of the feature that you want to deactivate.
To deactivate a plugin feature, run:
tanzu config set features.PLUGIN.FEATURE false
Where:
PLUGIN
is the name of the CLI plugin. For example, cluster
or management-cluster
.FEATURE
is the name of the feature that you want to deactivate.