MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Tanzu Command Line Options

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

CommandGroupPurposeTypical user
tanzu builder, tanzu codegenAdminScaffold, build and publish your own CLI pluginsPlugin developers
tanzu appsBuildCreate and manage workloads on Tanzu Application PlatformApplication developers
tanzu management-cluster (alias mc)RunCreate, upgrade and delete TKG management clustersPlatform operators
tanzu clusterRunCreate, scale, upgrade and delete workload clusters; fetch kubeconfigPlatform operators
tanzu kubernetes-release (alias kr)RunList the Kubernetes versions available for clustersPlatform operators
tanzu packageRunAdd package repositories and install Carvel packages through kapp-controllerOperators and developers
tanzu secretRunCreate registry pull secrets and export them across namespacesOperators
tanzu conformanceRunRun Sonobuoy conformance tests against a clusterOperators and QA
tanzu diagnosticsRunCollect logs and state from clusters for troubleshootingOperators and support
tanzu unmanaged-cluster (alias uc)RunSingle-node local clusters from Tanzu Community EditionLocal development
tanzu config, plugin, completion, versionSystemConfigure the CLI, manage plugins, enable shell completion, show the versionEveryone
tanzu init, login, updateSystemInitialise the CLI, log in to a management cluster, self-updateOlder 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-cluster belonged to Tanzu Community Edition, which VMware has retired. For local clusters, use kind, minikube or a supported Tanzu product instead.
  • tanzu login is deprecated in the standalone CLI. Use tanzu context create, tanzu context list and tanzu context use to connect to and switch between management clusters and other endpoints.
  • tanzu update no longer updates the CLI. Upgrade with your package manager (brew upgrade tanzu-cli, choco upgrade tanzu-cli), then update plugins with tanzu plugin install --group ... or tanzu plugin sync.
  • tanzu init is no longer needed to bootstrap plugin discovery. Plugins are found in a central repository with tanzu plugin search and tanzu 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 install flags changed between plugin versions. Older releases used --package-name; newer ones use --package. Check tanzu package install --help.

Common errors and fixes

SymptomLikely causeFix
unknown command "cluster" for "tanzu"The plugin is not installedRun 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 clusterNo active Tanzu contextRun tanzu context list, then tanzu context use <name>, or create one with tanzu context create
tanzu package commands fail or hangkapp-controller is missing, or the kubeconfig points at the wrong clusterCheck kubectl config current-context and kubectl get pods -A | grep kapp-controller
Package install stuck in reconcilingImage pull failure or invalid valuesRun tanzu package installed get <name> -n <ns> and check the registry secret
Flags from a tutorial are rejectedPlugin version differs from the tutorialRun <command> --help and match plugin versions to your platform release

Best practices

  • Keep cluster configuration files in Git and create clusters with --file so 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 --admin kubeconfigs only for break-glass access. Give day-to-day users identity-provider-backed (OIDC/LDAP) access.
  • Run tanzu diagnostics collect before 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

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
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.

Related Posts

Kubernetes Assignment and Project

This page is a five-day Kubernetes assignment. It starts with architecture and Pods, then moves through ReplicaSets, DaemonSets, Deployments, Services, CoreDNS service discovery and StatefulSets, and ends…

Read More

Kubernetes Tutorials: Example of StorageClass, PersistentVolume, PersistentVolumeClaim using EBS

This page shows how a StorageClass, a PersistentVolume (PV) and a PersistentVolumeClaim (PVC) work together to give Kubernetes pods persistent Amazon EBS storage. Below the original manifests…

Read More

Minikube Tutorials: minikube commands

minikube config set memory 10000 sets the default memory for new minikube clusters. It does not resize a cluster that already exists. This page explains how minikube…

Read More

How to Setup Jenkins X using AWS EKS?

Jenkins X v3 runs on Amazon EKS in two parts. Terraform (the jx3-terraform-eks repository) creates the EKS cluster and installs the Jenkins X git operator. The operator…

Read More

Knative Tutorials – Chapter 3 – Install Knative with YAML using minikube

This chapter installs Knative Serving, with Istio as the networking layer, on a local minikube cluster using the official YAML manifests. Below the original steps you will…

Read More

Kubectl: Persistent Volumes PV & PersistentVolumeClaim PVC

To turn an existing PersistentVolumeClaim (PVC) into a YAML manifest you can deploy again, run kubectl get pvc <name> -o yaml and remove the fields the cluster…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x