The Tanzu CLI is VMware's plugin-based command-line tool for creating and running Kubernetes clusters, installing packages and deploying applications on Tanzu platforms. The output above is the help screen from an older, Tanzu Community Edition era CLI. This guide explains what each command group does, shows the commands you will use most, and covers what has changed in the current standalone Tanzu CLI.
Available command groups:
Admin
tanzu builder Build Tanzu components
tanzu codegen Tanzu code generation tool
Build
tanzu apps Applications on Kubernetes
Run
tanzu conformance Run Sonobuoy conformance tests against clusters
tanzu diagnostics Cluster diagnostics
tanzu kubernetes-release Kubernetes release operations
tanzu management-cluster Kubernetes management cluster operations
tanzu package Tanzu package management
tanzu secret Tanzu secret management
System
tanzu completion Output shell completion code
tanzu config Configuration for the CLI
tanzu init Initialize the CLI
tanzu login Login to the platform
tanzu plugin Manage CLI plugins
tanzu update Update the CLI
tanzu version Version information
tanzu unmanaged-cluster Deploy and manage single-node, static, Tanzu clusters.
tanzu cluster Kubernetes cluster operationsCode language: JavaScript (javascript)
How the Tanzu CLI is structured
The tanzu binary is a small core with a plugin system. Only a few commands are built in, such as config, plugin, completion and version. Everything else, including cluster, package, apps and secret, is a separate plugin. That is why two engineers can run tanzu --help and see different lists: the output shows only the plugins installed on that machine.
The groups in the example above (Admin, Build, Run, System) come from each plugin's metadata. The last two entries, unmanaged-cluster and cluster, have no heading because of how that CLI version grouped them. Both are Run commands for operating clusters.
What each command group does
| Command | Group | Purpose | Typical user |
|---|---|---|---|
tanzu builder, tanzu codegen | Admin | Scaffold, build and publish your own CLI plugins | Plugin developers |
tanzu apps | Build | Create and manage workloads on Tanzu Application Platform | Application developers |
tanzu management-cluster (alias mc) | Run | Create, upgrade and delete TKG management clusters | Platform operators |
tanzu cluster | Run | Create, scale, upgrade and delete workload clusters; fetch kubeconfig | Platform operators |
tanzu kubernetes-release (alias kr) | Run | List the Kubernetes versions available for clusters | Platform operators |
tanzu package | Run | Add package repositories and install Carvel packages through kapp-controller | Operators and developers |
tanzu secret | Run | Create registry pull secrets and export them across namespaces | Operators |
tanzu conformance | Run | Run Sonobuoy conformance tests against a cluster | Operators and QA |
tanzu diagnostics | Run | Collect logs and state from clusters for troubleshooting | Operators and support |
tanzu unmanaged-cluster (alias uc) | Run | Single-node local clusters from Tanzu Community Edition | Local development |
tanzu config, plugin, completion, version | System | Configure the CLI, manage plugins, enable shell completion, show the version | Everyone |
tanzu init, login, update | System | Initialise the CLI, log in to a management cluster, self-update | Older CLI versions |
Install and verify the CLI
Current releases are published as the open-source standalone Tanzu CLI and installed through a package manager. Plugins are then installed separately, usually as a versioned group that matches your Tanzu product.
# macOS or Linux with Homebrew
brew update
brew install vmware-tanzu/tanzu/tanzu-cli
# Windows with Chocolatey
choco install tanzu-cli
# Verify the core binary
tanzu version
# See which plugins are installed and which are available
tanzu plugin list
tanzu plugin group search
# Install the plugin group for your product, for example TKG
tanzu plugin install --group vmware-tkg/defaultCode language: PHP (php)
Note: Pin the plugin group version to match your platform release (for example --group vmware-tkg/default:<version>). If plugins are newer or older than the platform you connect to, you can get confusing errors.
Common commands by task
Cluster lifecycle (Tanzu Kubernetes Grid). The management cluster is created once, and workload clusters are created from it using a cluster configuration file.
# Launch the installer UI, or create from a config file
tanzu management-cluster create --ui
tanzu management-cluster create --file mc-config.yaml
# Inspect the management cluster
tanzu management-cluster get
# Available Kubernetes releases
tanzu kubernetes-release get
# Workload clusters
tanzu cluster create --file workload-01.yaml
tanzu cluster list --include-management-cluster
tanzu cluster scale workload-01 --worker-machine-count 3
tanzu cluster kubeconfig get workload-01 --admin
kubectl config use-context workload-01-admin@workload-01
tanzu cluster delete workload-01Code language: PHP (php)
Packages and secrets. tanzu package needs kapp-controller running in the target cluster. TKG and TAP clusters already include it.
# Registry credentials, exported so other namespaces can use them
tanzu secret registry add my-registry \
--server "$REGISTRY_HOST" \
--username "$REGISTRY_USER" \
--password "$REGISTRY_PASSWORD" \
--export-to-all-namespaces --yes \
--namespace my-packages
# Add a package repository and browse it
tanzu package repository add my-repo --url <REPO_IMAGE_URL> --namespace my-packages
tanzu package available list --namespace my-packages
tanzu package available list cert-manager.tanzu.vmware.com --namespace my-packages
# Install and check a package
tanzu package install cert-manager \
--package cert-manager.tanzu.vmware.com \
--version <VERSION> \
--namespace my-packages
tanzu package installed list -ACode language: HTML, XML (xml)
Applications (Tanzu Application Platform). tanzu apps creates a Workload resource that the supply chain builds and deploys.
tanzu apps workload create my-app \
--git-repo https://github.com/example/my-app \
--git-branch main \
--type web \
--namespace dev
tanzu apps workload list --namespace dev
tanzu apps workload get my-app --namespace dev
tanzu apps workload tail my-app --namespace dev --since 10m
tanzu apps workload delete my-app --namespace devCode language: JavaScript (javascript)
Shell completion and discovering flags
Plugin flags vary between versions, so check --help on the plugin you actually have installed instead of copying flags from old blog posts. Shell completion makes this much faster.
# Bash: current session, then make it permanent
source <(tanzu completion bash)
echo 'source <(tanzu completion bash)' >> ~/.bashrc
# Zsh
echo 'source <(tanzu completion zsh)' >> ~/.zshrc
# Help at any level
tanzu --help
tanzu package --help
tanzu package install --helpCode language: PHP (php)
What has changed since this output was captured
The listing above is accurate for the CLI that shipped with Tanzu Community Edition and early TKG 1.x releases. With current versions, keep these differences in mind:
tanzu unmanaged-clusterbelonged to Tanzu Community Edition, which VMware has retired. For local clusters, use kind, minikube or a supported Tanzu product instead.tanzu loginis deprecated in the standalone CLI. Usetanzu context create,tanzu context listandtanzu context useto connect to and switch between management clusters and other endpoints.tanzu updateno longer updates the CLI. Upgrade with your package manager (brew upgrade tanzu-cli,choco upgrade tanzu-cli), then update plugins withtanzu plugin install --group ...ortanzu plugin sync.tanzu initis no longer needed to bootstrap plugin discovery. Plugins are found in a central repository withtanzu plugin searchandtanzu plugin group search.- Plugin installation moved from local tarballs (
tanzu plugin install --local <dir> all) to installing from that repository, usually as a version-pinned group. tanzu package installflags changed between plugin versions. Older releases used--package-name; newer ones use--package. Checktanzu package install --help.
Common errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
unknown command "cluster" for "tanzu" | The plugin is not installed | Run tanzu plugin list, then install the right group with tanzu plugin install --group <group> |
| Plugin commands ask for a context or fail to reach a cluster | No active Tanzu context | Run tanzu context list, then tanzu context use <name>, or create one with tanzu context create |
tanzu package commands fail or hang | kapp-controller is missing, or the kubeconfig points at the wrong cluster | Check kubectl config current-context and kubectl get pods -A | grep kapp-controller |
| Package install stuck in reconciling | Image pull failure or invalid values | Run tanzu package installed get <name> -n <ns> and check the registry secret |
| Flags from a tutorial are rejected | Plugin version differs from the tutorial | Run <command> --help and match plugin versions to your platform release |
Best practices
- Keep cluster configuration files in Git and create clusters with
--fileso they can be reviewed and reproduced. - Pin plugin group versions per environment so CI runners and engineer laptops behave the same.
- Pass registry passwords through environment variables or a secret manager. Literal passwords on the command line end up in shell history.
- Use
--adminkubeconfigs only for break-glass access. Give day-to-day users identity-provider-backed (OIDC/LDAP) access. - Run
tanzu diagnostics collectbefore opening a support case or tearing down a broken cluster, so the evidence is preserved.
For more on running the clusters these commands create, see the Kubernetes tutorials and the guide to resolving 500 errors in Kubernetes production.
Frequently asked questions
Why does my tanzu –help output differ from the list above?
Most Tanzu commands are plugins, and help lists only the plugins installed locally. Run tanzu plugin list to see what you have and tanzu plugin group search to find what you can install.
What replaced tanzu login?
In the standalone Tanzu CLI, tanzu login is deprecated in favour of contexts. Use tanzu context create to add an endpoint and tanzu context use to switch between endpoints.
Is tanzu unmanaged-cluster still supported?
No. It came with Tanzu Community Edition, which has been retired. For local single-node clusters, use tools such as kind or minikube.
How do I get a kubeconfig for a Tanzu workload cluster?
Run tanzu cluster kubeconfig get <cluster-name> --admin for admin access, or leave out --admin to get an identity-provider-based kubeconfig. Then switch to the new context with kubectl config use-context.
How do I update the Tanzu CLI?
Upgrade the core binary with the package manager you used to install it, such as Homebrew or Chocolatey. Then reinstall or sync plugins with tanzu plugin install --group <group> or tanzu plugin sync.
Related tutorials
- More Kubernetes tutorials
- Troubleshooting Guide to Resolving 500 Errors in Kubernetes Production Environments
- Kubernetes Administrator: Role Blueprint, Responsibilities, Skills, KPIs, and Career Path
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services โ all in one place.
Explore Hospitals