This topic explains the architecture of the Tanzu CLI and 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.What you can connect to with the Tanzu CLI, what commands you can run, what those commands do, and how you can expand CLI functionality depend on abstractions described in the sections below.
Tanzu CLI commands are organized into command groups, which are the sets of commands that all start with the same words. To list your current available command groups, run tanzu
.
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.
Most plugins need to be installed with the tanzu plugin install
command, either in groups or individually:
--group
option. Plugin groups include TAP, vSphere, TKG, and others.
tanzu plugin group search
to see available groups, or see Command Groups, Plugins, and Plugin Groups below.--groups
option, tanzu plugin install
installs CLI plugins individually.Context-scoped plugins install themselves automatically when you switch the CLI to use a context that they apply to. Many plugins for Tanzu Mission Control, the tmc
context type, are context-scoped, and so their commands are available without your having to run tanzu plugin install
.
The Tanzu CLI connects to Kubernetes clusters, product dashboards, and other API servers. Depending on what the CLI is connected to as a client, it changes the commands that it supports and what those commands do.
There are two sides to this interaction, client side and server side, which the Tanzu CLI represents as follows:
kubernetes
or k8s
for commands run on Kubernetes clusters, either directly or via Tanzu Platform huboperations
or ops
for platform operation commands run on Tanzu Platform hubmission-control
or tmc
for commands run on Tanzu Mission Controlglobal
for commands that do not depend on what the CLI is connected totanzu
in the command, unless the target is global
. For example with tanzu ops apply
commands.
k8s
target from command strings.tanzu context create
and log in to them with tanzu context use
.
kubernetes
or k8s
for Kubernetes clusterstanzu
for Tanzu Platform hubmission-control
or tmc
for Tanzu Mission Control-t
or --type
flag of tanzu context create
when you create a 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 Tanzu CLI includes the following commands and command groups.
Command functionality comes from either the core CLI or from CLI plugins. Each plugin is associated with a command group, which is a set of available commands that all start with the same words, for example tanzu imgpkg
.
The table below lists Tanzu CLI command groups, along with:
global
do not include a target after tanzu
.k8s
, tmc
, or ops
), or omit it if the plugin’s target is global
.
k8s
without including the k8s
.k8s
, tmc
, or tanzu
.
-t
or --type
flag of tanzu context create
when you create a context.--group
flag of tanzu plugin install
when you install a group of plugins at once. You identify the group with a string that the table below abbreviates as follows:
vmware-tap/default
vmware-tanzu/app-developer
vmware-tanzu/platform-engineer
vmware-tkg/default
vmware-tmc/default
vmware-vsphere/default
telemetry
plugin is installed by vmware-tanzucli/essentials
in addition to the TKG plugin group.pinniped-auth
plugin, which provides commands that are not normally invoked directly.Command group | Source | Context type | Plugin groups (or context-scoped) |
---|---|---|---|
tanzu k8s accelerator | CLI plugin: accelerator |
k8s |
TAP |
tanzu ops apply | CLI plugin: apply |
tanzu |
Tanzu Platform hub PE |
tanzu k8s apps | CLI plugin: apps |
k8s |
TAP |
tanzu app | CLI plugin: appsv2 |
tanzu |
Tanzu Platform hub Dev, global target |
tanzu availability-target | CLI plugin: space |
tanzu |
Tanzu Platform hub Dev, Tanzu Platform hub PE |
tanzu k8s build-service | CLI plugin: build-service |
k8s |
TAP |
tanzu k8s cluster | CLI plugin: cluster |
k8s |
context-scoped |
tanzu ops cluster | CLI plugin: cluster |
tanzu |
Tanzu Platform hub PE |
tanzu ops clustergroup | CLI plugin: cluster ; Target: operations |
tanzu |
Tanzu Platform hub PE |
tanzu completion | Core CLI | N/A - local CLI | N/A - system command |
tanzu config | Core CLI | N/A - local CLI | N/A - system command |
tanzu context | Core CLI | N/A - local CLI | N/A - system command |
tanzu deploy | CLI plugin: resource |
tanzu |
Tanzu Platform hub Dev |
tanzu k8s diagnostics | CLI plugin: diagnostics |
k8s |
|
tanzu k8s external-secrets | CLI plugin: external-secrets |
k8s |
TAP |
tanzu k8s feature | CLI plugin: feature |
k8s |
context-scoped |
tanzu ops iam | CLI plugin: feature |
tanzu |
Tanzu Platform hub PE |
tanzu imgpkg | CLI plugin: imgpkg |
N/A - local CLI | N/A - global plugin |
tanzu init | Core CLI | N/A - local CLI | N/A - system command |
tanzu k8s insight | CLI plugin: insight |
k8s |
TAP |
tanzu isolated-cluster | CLI plugin: isolated-cluster |
N/A - local CLI | N/A - global plugin |
tanzu k8s kubernetes-release | CLI plugin: kubernetes-release |
k8s |
context-scoped |
tanzu login | Core CLI | N/A - local CLI | N/A - system command |
tanzu management-cluster | CLI plugin: management-cluster |
k8s |
TKG |
tanzu namespaces | CLI plugin: namespaces |
k8s |
TAP |
tanzu k8s package | CLI plugin: package |
k8s |
TAP, Tanzu Platform hub Dev, TKG, vSphere |
tanzu plugin | Core CLI | N/A - local CLI | N/A - system command |
tanzu ops policy | CLI plugin: policy |
tanzu |
Tanzu Platform hub PE |
tanzu profile | CLI plugin: space |
tanzu |
Tanzu Platform hub Dev, Tanzu Platform hub PE |
tanzu project | CLI plugin: project |
tanzu |
TAP, Tanzu Platform hub Dev |
tanzu promote | CLI plugin: resource |
tanzu |
Tanzu Platform hub Dev |
tanzu k8s secret | CLI plugin: secret |
k8s |
TAP, Tanzu Platform hub Dev, Tanzu Platform hub PE, TKG, vSphere |
tanzu service-mesh | CLI plugin: service-mesh |
k8s |
N/A - global plugin |
tanzu k8s services | CLI plugin: services |
k8s |
TAP |
tanzu space | CLI plugin: space |
tanzu |
Tanzu Platform hub Dev, Tanzu Platform hub PE |
tanzu telemetry | CLI plugin: telemetry |
N/A - local CLI | N/A - global plugin |
tanzu k8s telemetry | CLI plugin: telemetry |
k8s |
TKG |
tanzu trait | CLI plugin: space |
tanzu |
Tanzu Platform hub Dev, Tanzu Platform hub PE |
tanzu version | Core CLI | N/A - local CLI | N/A - system command |
The table below lists Tanzu CLI use cases with the following properties:
--type
, or else N/A for the local CLI itself.Context | Context Type | Target | Plugin Group |
---|---|---|---|
Why: CLI Operations: configure CLI options, install plugins, manage contexts, etc. | |||
The CLI itself | N/A - local | N/A - CLI core and global target |
N/A |
Why: Platform Management: infrastructure, clusters, spaces, packaged services, monitoring, etc. | |||
Tanzu Platform hub, for platform ops | tanzu |
ops |
Tanzu Platform hub PE |
TKG Supervisor | k8s |
k8s |
vSphere |
TKG standalone management cluster | k8s |
k8s |
TKG |
Tanzu Mission Control | tmc |
tmc |
TMC |
Why: Application Operations: develop, deploy, manage, and optimize apps. | |||
Any Kubernetes workload cluster | k8s |
k8s |
TAP |
Tanzu Platform hub, for apps managed across multiple clusters | tanzu or k8s |
k8s |
Tanzu Platform hub Dev |
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. NOTE: Deploying management clusters to AWS is not supported from the TKG v2.5 version of the |
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.